Esempio n. 1
0
        /// <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);
            }
        }
Esempio n. 2
0
 /// <summary>停止状态机</summary>
 public virtual void StopStateMachine()
 {
     IsRun = false;
     FSMFrameUpdater?.Invoke(this, false);
 }