Пример #1
0
 //条件检测,由状态机每帧调用
 public void Reason(BaseFSM fsm)
 {
     for (int i = 0; i < triggerList.Count; i++)
     {
         if (triggerList[i].HandleTrigger(fsm))
         {
             //发现满足的条件
             //切换状态
             FSMStateID stateID = map[triggerList[i].TriggerID];
             fsm.ChanageState(stateID);
         }
     }
 }