导入
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user