private void Init() { if (null == stateController) { stateController = new CharcterStateController(this); } CharacterIdleState idleState = CharacterStateFactory.GetCharacterIdleState(); stateController.ChangeState(idleState); }
public static CharacterIdleState GetCharacterIdleState() { if (idleStateQueue.Count > 0) { return(idleStateQueue.Dequeue()); } else { CharacterIdleState state = new CharacterIdleState(); return(state); } }
public void PlayIdleState() { CharacterIdleState state = CharacterStateFactory.GetCharacterIdleState(); stateController.ChangeState(state); }