Example #1
0
 public virtual void changeState(NPCState newState)
 {
     if (currState != null)
     {
         currState.Exit();
     }
     currState = newState;
     currState.Enter(this);
 }
Example #2
0
 protected void ChangeState(NPCState to)
 {
     //    print("【State Changed】 to " + to);
     if (currentState != null)
     {
         currentState.Exit(this);
     }
     currentState = to;
     currentState.Enter(this);
 }
Example #3
0
 public void ChangeState(NPCState newState)
 {
     currentState.Exit(this);
     currentState = newState;
     currentState.Enter(this);
 }