Пример #1
0
        private void Init()
        {
            if (null == stateController)
            {
                stateController = new CharcterStateController(this);
            }
            CharacterIdleState idleState = CharacterStateFactory.GetCharacterIdleState();

            stateController.ChangeState(idleState);
        }
Пример #2
0
 public static CharacterIdleState GetCharacterIdleState()
 {
     if (idleStateQueue.Count > 0)
     {
         return(idleStateQueue.Dequeue());
     }
     else
     {
         CharacterIdleState state = new CharacterIdleState();
         return(state);
     }
 }
Пример #3
0
        public void PlayIdleState()
        {
            CharacterIdleState state = CharacterStateFactory.GetCharacterIdleState();

            stateController.ChangeState(state);
        }