提交动画相关内容个、

This commit is contained in:
2026-01-02 23:59:46 +08:00
parent 97db0876b1
commit 1152ee74a7
637 changed files with 799564 additions and 2147 deletions

View File

@@ -8,10 +8,18 @@ namespace NBF
private PlayerState _previousPlayerState = PlayerState.idle;
private PlayerState _playerState;
public bool ChangeItem;
public bool Run;
public bool IsGrounded;
public float Speed;
public float RotationSpeed;
public float ReelSpeed;
public float LineTension;
/// <summary>
/// 是否路亚竿
/// </summary>
public bool IsLureRod;
public Vector2 MoveInput;
@@ -25,10 +33,27 @@ namespace NBF
{
_previousPlayerState = _playerState;
_playerState = value;
NextState = value;
OnStateChange?.Invoke(_playerState);
}
}
[SerializeField] private PlayerState NextState;
public event Action<PlayerState> OnStateChange;
private void Start()
{
NextState = State;
}
private void Update()
{
if (NextState != State)
{
State = NextState;
}
}
}
}