/// <summary>运行状态机</summary> public virtual void Run(IStateParam param = null, int initState = int.MaxValue) { IsRun = true; FSMFrameUpdater?.Invoke(this, true); if (initState != int.MaxValue) { ChangeState(initState, param); } else if (DefaultState != int.MaxValue) { ChangeToDefaultState(param); } }
/// <summary>停止状态机</summary> public virtual void StopStateMachine() { IsRun = false; FSMFrameUpdater?.Invoke(this, false); }