///<summary>条件检测</summary> public virtual void Reason(BaseFSM fsm) { for (int i = 0; i < triggers.Count; i++) { //如果当前条件满足,则切换到对应的状态 if (triggers[i].HandleTrigger(fsm)) { //根据条件获取状态ID var stateID = GetOutputState(triggers[i].triggerid); //通过状态机切换状态 fsm.ChangActiveState(stateID); return; } } }