Esempio n. 1
0
 public virtual void changeState(NPCState newState, float newDuration)
 {
     if (currState != null)
     {
         currState.Exit();
     }
     currState = newState;
     currState.Enter(this, newDuration);
 }
Esempio n. 2
0
 public virtual void changeState(NPCState newState)
 {
     if (currState != null)
     {
         currState.Exit();
     }
     currState = newState;
     currState.Enter(this);
 }
Esempio n. 3
0
 protected void ChangeState(NPCState to)
 {
     //    print("【State Changed】 to " + to);
     if (currentState != null)
     {
         currentState.Exit(this);
     }
     currentState = to;
     currentState.Enter(this);
 }
Esempio n. 4
0
 public void ChangeState(NPCState newState)
 {
     currentState.Exit(this);
     currentState = newState;
     currentState.Enter(this);
 }
Esempio n. 5
0
 public virtual void changeState(NPCState newState, NPCState prevState)
 {
     // no need to exit previous state(will be returning later, anyways)
     currState = newState;
     currState.Enter(this, prevState);
 }