예제 #1
0
 public void Tick()
 {
     if (currentState != nextState)
     {
         currentState.OnStateExit(this);
         currentState = nextState;
         currentState.OnStateEnter(this);
     }
     else
     {
         currentState.OnStateUpdate(this);
     }
 }
예제 #2
0
 public StateController(AiState startingState, Enemy owner)
 {
     Owner        = owner;
     currentState = nextState = startingState;
 }