Exemple #1
0
 public void SetState(IPlayerState state)
 {
     if (state.Equals(CurrentState))
     {
         return;
     }
     //Vector2 pos = Position;
     CurrentState = state;
     //Position = pos;
 }
 public void SwitchState(IPlayerState newPlayerState)
 {
     if (newPlayerState.Equals(null))
     {
         return;
     }
     m_PlayerState.OnExit();
     m_PlayerState = newPlayerState;
     m_PlayerState.OnEnter();
 }
Exemple #3
0
 public bool IsCurrentState(IPlayerState state)
 {
     return(state.Equals(CurrentState));
 }