Beispiel #1
0
 public void Update()
 {
     //currentState.Reason(this);
     //currentState.Action(this);
     if (currentState != null)
     {
         //当前状态下的行为
         currentState.Action(this);
         //当前状态下转换条件的检测
         currentState.Reason(this);
     }
 }
Beispiel #2
0
 public void OnUpdate(GameObject npc)
 {
     currentState.Action(npc);
     currentState.Reason(npc);
 }