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(); }
public bool IsCurrentState(IPlayerState state) { return(state.Equals(CurrentState)); }