예제 #1
0
 public void Start()
 {
     HasStart       = true;
     IsTimeCounting = true;
     IsStarted      = true;
     if (IsPause)
     {
         IsPause = false;
     }
     else
     {
         UpdaterNotice.AddSceneUpdater(this);
     }
 }
예제 #2
0
 public void AddUpdate(Action <int> method)
 {
     if (!mUpdaterMapper.ContainsKey(method))
     {
         MethodUpdater updater = new MethodUpdater
         {
             Update = method
         };
         mUpdaterMapper[method] = updater;
         UpdaterNotice.AddSceneUpdater(updater);
     }
     else
     {
     }
 }
예제 #3
0
 public void AddLateUpdate(Action method)
 {
     if (!mLateUpdaterMapper.ContainsKey(method))
     {
         MethodUpdater updater = new MethodUpdater
         {
             LateUpdate   = method,
             IsLateUpdate = true,
             IsUpdate     = false,
         };
         mLateUpdaterMapper[method] = updater;
         UpdaterNotice.AddSceneUpdater(updater);
     }
     else
     {
     }
 }
예제 #4
0
 private void OnStateFrameUpdater(IState state, bool isAdd)
 {
     if (isAdd)
     {
         if (!mStateUpdaters.IsContainsKey(state))
         {
             MethodUpdater updater = new MethodUpdater
             {
                 Update = state.UpdateState
             };
             mStateUpdaters[state] = updater;
             UpdaterNotice.AddSceneUpdater(updater);
         }
     }
     else
     {
         IUpdate updater = mStateUpdaters[state];
         UpdaterNotice.RemoveSceneUpdater(updater);
     }
 }
예제 #5
0
 private void OnFSMFrameUpdater(IStateMachine fsm, bool isAdd)
 {
     if (mFSMUpdaters == default)
     {
         return;
     }
     if (isAdd)
     {
         MethodUpdater updater = new MethodUpdater
         {
             Update = fsm.UpdateState
         };
         mFSMUpdaters[fsm] = updater;
         UpdaterNotice.AddSceneUpdater(updater);
     }
     else
     {
         IUpdate updater = mFSMUpdaters[fsm];
         UpdaterNotice.RemoveSceneUpdater(updater);
     }
 }
예제 #6
0
 private void OnFSMFrameUpdater(IStateMachine fsm, bool isAdd)
 {
     if (isAdd)
     {
         if (!mFSMUpdaters.ContainsKey(fsm))
         {
             MethodUpdater updater = new MethodUpdater
             {
                 Update = fsm.UpdateState
             };
             mFSMUpdaters[fsm] = updater;
             UpdaterNotice.AddSceneUpdater(updater);
         }
         else
         {
         }
     }
     else
     {
         IUpdate updater = mFSMUpdaters.GetValue(fsm, true);
         UpdaterNotice.RemoveSceneUpdater(updater);
     }
 }
예제 #7
0
 public void Start()
 {
     HasStart       = true;
     IsTimeCounting = true;
     UpdaterNotice.AddSceneUpdater(this);
 }