This commit is contained in:
2026-01-01 23:57:29 +08:00
parent 04dd4a23b2
commit bfdfcfe2cd
13 changed files with 407 additions and 180 deletions

View File

@@ -5,6 +5,7 @@ namespace NBF
{
public class FPlayerData : MonoService<FPlayerData>
{
private PlayerState _previousPlayerState = PlayerState.idle;
private PlayerState _playerState;
public bool Run;
@@ -14,11 +15,15 @@ namespace NBF
public Vector2 MoveInput;
public PlayerState PreviousState => _previousPlayerState;
public PlayerState State
{
get => _playerState;
set
{
_previousPlayerState = _playerState;
_playerState = value;
OnStateChange?.Invoke(_playerState);
}