private void Init()
        {
            if (null == stateController)
            {
                stateController = new CharcterStateController(this);
            }
            CharacterIdleState idleState = CharacterStateFactory.GetCharacterIdleState();

            stateController.ChangeState(idleState);
        }
Esempio n. 2
0
 public virtual void Dispose()
 {
     CharacterStateFactory.DisposeState(State, this);
 }
        public void PlayWalkState()
        {
            CharacterWalkState state = CharacterStateFactory.GetCharacterWalkState();

            stateController.ChangeState(state);
        }