protected virtual void OnDestroy() { LegacyLogic.Instance.EventManager.UnregisterEvent(EEventType.GAMETIME_DAYSTATE_CHANGED, new EventHandler(OnGameTimeChanged)); LegacyLogic.Instance.EventManager.UnregisterEvent(EEventType.FINISH_LOAD_VIEWS, new EventHandler(OnFinishLoadViews)); s_Instance = null; m_Objects.Clear(); }
protected virtual void Awake() { if (s_Instance != null && s_Instance != this) { Destroy(this); throw new Exception(typeof(DaytimeDependentController) + "\nInstance already set! by -> " + s_Instance); } s_Instance = this; }
protected virtual void Awake() { DaytimeDependentController.Register(this); }
protected virtual void OnDestroy() { DaytimeDependentController.Unregister(this); }