Пример #1
0
 public void SetState(IPlayerState state)
 {
     if (state != null)
     {
         // Debug.Log("State set:" + state.GetName());
         if (currentState != null)
         {
             currentState.OnExitState(defaultPlayerParams);
         }
         currentState = state;
         currentState.OnEnteredState(defaultPlayerParams);
     }
     else
     {
         Debug.LogError("Can't enter null state");
     }
 }