change
This commit is contained in:
@@ -23,7 +23,80 @@ namespace NBF
|
||||
|
||||
protected override uint onUpdate()
|
||||
{
|
||||
return States.None;
|
||||
var ret = States.None;
|
||||
var isUpRod = false;
|
||||
var isSubLine = false;
|
||||
|
||||
if (InputManager.IsOp1)
|
||||
{
|
||||
if (!Player.Data.IsLureRod)
|
||||
{
|
||||
//抬杆
|
||||
isUpRod = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//收线
|
||||
isSubLine = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (InputManager.IsOp2)
|
||||
{
|
||||
if (Player.Data.IsLureRod)
|
||||
{
|
||||
//抬杆
|
||||
isUpRod = true;
|
||||
}
|
||||
}
|
||||
|
||||
//Player.ModelAsset.PlayerAnimator.FishingUp = 0;
|
||||
|
||||
if (isUpRod || Player.ModelAsset.PlayerAnimator.FishingUp > 0)
|
||||
{
|
||||
var upForce = 1;
|
||||
var addNum = upForce * Time.deltaTime;
|
||||
if (!isUpRod)
|
||||
{
|
||||
addNum *= -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
addNum *= 0.5f;
|
||||
}
|
||||
|
||||
// Debug.Log($"addNum={addNum}");
|
||||
Player.ModelAsset.PlayerAnimator.FishingUp += addNum;
|
||||
Debug.LogError($"ishingFinal={Player.ModelAsset.PlayerAnimator.FishingUp}");
|
||||
if (Player.ModelAsset.PlayerAnimator.FishingUp >= 1)
|
||||
{
|
||||
Player.ModelAsset.PlayerAnimator.FishingUp = 1;
|
||||
}
|
||||
else if (Player.ModelAsset.PlayerAnimator.FishingUp < 0)
|
||||
{
|
||||
Player.ModelAsset.PlayerAnimator.FishingUp = 0;
|
||||
}
|
||||
|
||||
if (Player.ModelAsset.PlayerAnimator.FishingUp >= 0.8f)
|
||||
{
|
||||
ret = CheckTackFish();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Player.ModelAsset.PlayerAnimator.FishingUp = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#region 检查上鱼或者返回待机
|
||||
|
||||
private uint CheckTackFish()
|
||||
{
|
||||
return (uint)PlayerState.Idle;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user