public void Stop() { Puase(); mTime = 0; UpdaterNotice.RemoveSceneUpdater(this); }
public void Stop() { Pause(); Time = 0; IsStarted = false; IsPause = false; UpdaterNotice.RemoveSceneUpdater(this); }
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); }
public void RemoveUpdate(Action <int> method) { if (mUpdaterMapper.ContainsKey(method)) { MethodUpdater updater = mUpdaterMapper.GetValue(method, true); UpdaterNotice.RemoveSceneUpdater(updater); updater.Dispose(); } else { } }
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); } }
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(); }
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); } }
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); } }