示例#1
0
 public GameState(StateID id,
                  DelegateOnEnter onEnter,
                  DelegateOnEnter onExit        = null,
                  DelegateOnEnter onUpdate      = null,
                  DelegateOnEnter onFixedUpdate = null) : base((int)id, onEnter, onExit, onUpdate, onFixedUpdate)
 {
 }
示例#2
0
 //protected BoardMemory mBoard;
 //protected FiniteStateMachine mFsm;
 public GameState(StateID id,
                  DelegateOnEnter onEnter,
                  DelegateOnEnter onExit        = null,
                  DelegateOnEnter onUpdate      = null,
                  DelegateOnEnter onFixedUpdate = null) : base((int)id, onEnter, onExit, onUpdate, onFixedUpdate)
 {
     //ID = (int)id;
     //OnEnter = onEnter;
     //OnExit = onExit;
     //OnUpdate = onUpdate;
     //OnFixedUpdate = onFixedUpdate;
 }
示例#3
0
 public State(int id,
              DelegateOnEnter onEnter,
              DelegateOnEnter onExit,
              DelegateOnEnter onUpdate,
              DelegateOnEnter onFixedUpdate)
 {
     ID            = id;
     OnEnter       = onEnter;
     OnExit        = onExit;
     OnUpdate      = onUpdate;
     OnFixedUpdate = onFixedUpdate;
 }
        /// <summary>
        /// 最后清理.</summary>
        public void Cleanup()
        {
            _luaOnEnter   = null;
            _luaOnLeave   = null;
            _luaOnUpdate  = null;
            _luaOnDestroy = null;
            _workerTable  = null;

            if (_scriptEnv != null)
            {
                _scriptEnv.Dispose();
            }
            _scriptEnv = null;
        }