public void Start() { HasStart = true; IsTimeCounting = true; IsStarted = true; if (IsPause) { IsPause = false; } else { UpdaterNotice.AddSceneUpdater(this); } }
public void AddUpdate(Action <int> method) { if (!mUpdaterMapper.ContainsKey(method)) { MethodUpdater updater = new MethodUpdater { Update = method }; mUpdaterMapper[method] = updater; UpdaterNotice.AddSceneUpdater(updater); } else { } }
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 { } }
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); } }
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); } }
public void Start() { HasStart = true; IsTimeCounting = true; UpdaterNotice.AddSceneUpdater(this); }