ECM2
This commit is contained in:
@@ -686,29 +686,29 @@ public class FFish : MonoBehaviour
|
||||
currentBaitLure.transform.localPosition = Vector3.zero;
|
||||
}
|
||||
|
||||
if (currentRod.linelenghtDiferent > 0f &&
|
||||
Vector3.Distance(transform.position, currentRod.transform.position) < 5f && InputManager.isPullUpRod)
|
||||
{
|
||||
getFishCounter = Mathf.MoveTowards(getFishCounter, 1f, Time.deltaTime * 0.5f);
|
||||
// FScriptsHandler.Instance.m_HudManager.ShowGetFishCircle(getFishCounter);
|
||||
if (Mathf.Approximately(getFishCounter, 1f))
|
||||
{
|
||||
GetFish();
|
||||
// FScriptsHandler.Instance.m_HudManager.ShowGetFishCircle(-1f);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (currentRod.linelenghtDiferent > 0f &&
|
||||
Vector3.Distance(transform.position, currentRod.transform.position) < 5f)
|
||||
{
|
||||
getFishCounter = 0f;
|
||||
// FScriptsHandler.Instance.m_HudManager.ShowGetFishCircle(0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
getFishCounter = 0f;
|
||||
// FScriptsHandler.Instance.m_HudManager.ShowGetFishCircle(-1f);
|
||||
}
|
||||
// if (currentRod.linelenghtDiferent > 0f &&
|
||||
// Vector3.Distance(transform.position, currentRod.transform.position) < 5f && InputManager.isPullUpRod)
|
||||
// {
|
||||
// getFishCounter = Mathf.MoveTowards(getFishCounter, 1f, Time.deltaTime * 0.5f);
|
||||
// // FScriptsHandler.Instance.m_HudManager.ShowGetFishCircle(getFishCounter);
|
||||
// if (Mathf.Approximately(getFishCounter, 1f))
|
||||
// {
|
||||
// GetFish();
|
||||
// // FScriptsHandler.Instance.m_HudManager.ShowGetFishCircle(-1f);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// else if (currentRod.linelenghtDiferent > 0f &&
|
||||
// Vector3.Distance(transform.position, currentRod.transform.position) < 5f)
|
||||
// {
|
||||
// getFishCounter = 0f;
|
||||
// // FScriptsHandler.Instance.m_HudManager.ShowGetFishCircle(0f);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// getFishCounter = 0f;
|
||||
// // FScriptsHandler.Instance.m_HudManager.ShowGetFishCircle(-1f);
|
||||
// }
|
||||
|
||||
if (CheckUnnhookFish() && getFishCounter == 0f)
|
||||
{
|
||||
@@ -724,62 +724,62 @@ public class FFish : MonoBehaviour
|
||||
var reel = currentRod.Owner.Gears.Reel;
|
||||
if ((bool)currentRod.Owner)
|
||||
{
|
||||
if (InputManager.isPullUpRod)
|
||||
{
|
||||
pullingTime += Time.deltaTime;
|
||||
if (currentRod.Owner.handPullUp < 1f)
|
||||
{
|
||||
if (reel.reelingDrag > 0f)
|
||||
{
|
||||
if (reel.reelingDrag < 1f)
|
||||
{
|
||||
fishingReel = true;
|
||||
}
|
||||
|
||||
int num2 = 2;
|
||||
if (pullingTime < num2)
|
||||
{
|
||||
float num3 = currentRod.Owner.handPullUp *
|
||||
currentRod.currentLineStrenght * 0.25f / fishWeight;
|
||||
num -= num3;
|
||||
fishStrenght -= num3;
|
||||
fishStamina = Mathf.MoveTowards(fishStamina, 0.03f, Time.deltaTime * num3);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (reel.reelingDrag > 0f)
|
||||
{
|
||||
fishingReel = true;
|
||||
fishStamina = Mathf.MoveTowards(fishStamina, 0.03f,
|
||||
Time.deltaTime * 0.025f * currentRod.currentLineStrenght *
|
||||
reel.reelingDrag);
|
||||
if (fishStamina <= 0.035 && fishWeight >= 300f)
|
||||
{
|
||||
Vector3 position = SceneSettings.Instance.transform.position;
|
||||
Quaternion b = Quaternion.LookRotation(position - transform.position);
|
||||
float value = Vector3.Distance(transform.position, position);
|
||||
rigidbody.rotation = Quaternion.Slerp(rigidbody.rotation, b, Time.deltaTime * (5f + speed));
|
||||
rigidbody.transform.Translate(Vector3.forward * Time.deltaTime * speed);
|
||||
speed = Mathf.MoveTowards(speed, Mathf.Clamp01(value) * 0.25f + 0.1f, Time.deltaTime);
|
||||
SetAngularAnim(position);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pullingTime != 0f)
|
||||
{
|
||||
pullingTime = 0f;
|
||||
}
|
||||
|
||||
fishingReel = false;
|
||||
if (reel.reelingDrag > 0f)
|
||||
{
|
||||
fishStamina = Mathf.MoveTowards(fishStamina, 0.03f,
|
||||
Time.deltaTime * 0.001f * currentRod.currentLineStrenght *
|
||||
reel.reelingDrag);
|
||||
}
|
||||
}
|
||||
// if (InputManager.isPullUpRod)
|
||||
// {
|
||||
// pullingTime += Time.deltaTime;
|
||||
// if (currentRod.Owner.handPullUp < 1f)
|
||||
// {
|
||||
// if (reel.reelingDrag > 0f)
|
||||
// {
|
||||
// if (reel.reelingDrag < 1f)
|
||||
// {
|
||||
// fishingReel = true;
|
||||
// }
|
||||
//
|
||||
// int num2 = 2;
|
||||
// if (pullingTime < num2)
|
||||
// {
|
||||
// float num3 = currentRod.Owner.handPullUp *
|
||||
// currentRod.currentLineStrenght * 0.25f / fishWeight;
|
||||
// num -= num3;
|
||||
// fishStrenght -= num3;
|
||||
// fishStamina = Mathf.MoveTowards(fishStamina, 0.03f, Time.deltaTime * num3);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else if (reel.reelingDrag > 0f)
|
||||
// {
|
||||
// fishingReel = true;
|
||||
// fishStamina = Mathf.MoveTowards(fishStamina, 0.03f,
|
||||
// Time.deltaTime * 0.025f * currentRod.currentLineStrenght *
|
||||
// reel.reelingDrag);
|
||||
// if (fishStamina <= 0.035 && fishWeight >= 300f)
|
||||
// {
|
||||
// Vector3 position = SceneSettings.Instance.transform.position;
|
||||
// Quaternion b = Quaternion.LookRotation(position - transform.position);
|
||||
// float value = Vector3.Distance(transform.position, position);
|
||||
// rigidbody.rotation = Quaternion.Slerp(rigidbody.rotation, b, Time.deltaTime * (5f + speed));
|
||||
// rigidbody.transform.Translate(Vector3.forward * Time.deltaTime * speed);
|
||||
// speed = Mathf.MoveTowards(speed, Mathf.Clamp01(value) * 0.25f + 0.1f, Time.deltaTime);
|
||||
// SetAngularAnim(position);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (pullingTime != 0f)
|
||||
// {
|
||||
// pullingTime = 0f;
|
||||
// }
|
||||
//
|
||||
// fishingReel = false;
|
||||
// if (reel.reelingDrag > 0f)
|
||||
// {
|
||||
// fishStamina = Mathf.MoveTowards(fishStamina, 0.03f,
|
||||
// Time.deltaTime * 0.001f * currentRod.currentLineStrenght *
|
||||
// reel.reelingDrag);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
// if ((bool)currentRod.currentPlayer &&
|
||||
|
||||
Reference in New Issue
Block a user