Пример #1
0
 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();
 }
Пример #2
0
 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;
 }
Пример #3
0
 protected virtual void Awake()
 {
     DaytimeDependentController.Register(this);
 }
Пример #4
0
 protected virtual void OnDestroy()
 {
     DaytimeDependentController.Unregister(this);
 }