示例#1
0
 public void ChangeState(HeroState newState)
 {
     currentState.OnExit();
     currentState = newState;
     currentState.OnEnter();
 }
示例#2
0
 public void Start(HeroState initialState)
 {
     currentState = initialState;
     currentState.OnEnter();
 }