Exemplo n.º 1
0
    //检测当前状态条件
    public void Reason(FSMBase fsm)
    {
        for (int i = 0; i < Triggers.Count; i++)
        {
            if (Triggers[i].HandleTrigger(fsm))
            {
                FSMStateID stateID = map[Triggers[i].TriggerID];
                fsm.ChangeActiveState(stateID);

                return;
            }
        }
    }