protected virtual FSMState StateFromEvent(FSMEvent ev) { FSMState ret = (ev == null ? null : GetState(ev.FSMStateTypeToTransfer)); return(CheckTransfer(ret) ? ret : null); }
protected virtual bool CheckTransfer(FSMState next) { return(next != null); }
} // 默认状态 public FSM(List <FSMState> states, FSMState defState) { _states = states; CurState = DefState = defState; CurState.OnEnter(); }