예제 #1
0
        private void SwitchState(GameObjectState newState)
        {
            int index = registeredStates.IndexOf(newState);

            if (index > -1)
            {
                currentState = newState;
            }
        }
예제 #2
0
 public void RegisterNewState(GameObjectState newState)
 {
     registeredStates.Add(newState);
 }
예제 #3
0
 public GameObjectState(GameObjectState previousState = null, GameObjectState nextState = null)
 {
     this.previousState = previousState;
     this.nextState     = nextState;
 }