示例#1
0
        public void Stop()
        {
            Puase();

            mTime = 0;
            UpdaterNotice.RemoveSceneUpdater(this);
        }
示例#2
0
        public void Stop()
        {
            Pause();

            Time      = 0;
            IsStarted = false;
            IsPause   = false;

            UpdaterNotice.RemoveSceneUpdater(this);
        }
示例#3
0
        public void Recreate(float totalTime, Action method, Func <bool> cancelCondition = default, int repeats = 0)
        {
            TotalRepeats   = repeats;
            TotalTime      = totalTime;
            Completion     = method;
            mRepeats       = repeats;
            Repeatable     = mRepeats > 0;
            mCancelChecker = cancelCondition;

            UpdaterNotice.RemoveSceneUpdater(this);
        }
示例#4
0
 public void RemoveUpdate(Action <int> method)
 {
     if (mUpdaterMapper.ContainsKey(method))
     {
         MethodUpdater updater = mUpdaterMapper.GetValue(method, true);
         UpdaterNotice.RemoveSceneUpdater(updater);
         updater.Dispose();
     }
     else
     {
     }
 }
示例#5
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);
     }
 }
示例#6
0
        public void Clean()
        {
            MethodUpdater updater;
            int           max = mUpdaterMapper.Size;

            for (int i = 0; i < max; i++)
            {
                updater = mUpdaterMapper.GetValueByIndex(i);
                UpdaterNotice.RemoveSceneUpdater(updater);
                updater.Dispose();
            }
            max = mUpdaterMapper.Size;
            for (int i = 0; i < max; i++)
            {
                updater = mLateUpdaterMapper.GetValueByIndex(i);
                UpdaterNotice.RemoveSceneUpdater(updater);
                updater.Dispose();
            }
            mUpdaterMapper?.Clear();
            mLateUpdaterMapper?.Clear();
        }
示例#7
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);
     }
 }
示例#8
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);
     }
 }