Пример #1
0
 public void CleanupEventSubscriptions()
 {
     //Debug.Log("XPBarController.CleanupEventSubscriptions()");
     if (!eventSubscriptionsInitialized)
     {
         return;
     }
     if (SystemEventManager.MyInstance != null)
     {
         SystemEventManager.MyInstance.OnXPGained     -= UpdateXP;
         SystemEventManager.MyInstance.OnLevelChanged -= UpdateXPBar;
         SystemEventManager.StopListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     }
     eventSubscriptionsInitialized = false;
 }
Пример #2
0
 protected override void CleanupEventSubscriptions()
 {
     //Debug.Log("PlayerManager.CleanupEventSubscriptions()");
     if (!eventSubscriptionsInitialized)
     {
         return;
     }
     if (baseCharacter != null)
     {
         baseCharacter.OnClassChange -= HandleClassChange;
     }
     SystemEventManager.StopListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     SystemEventManager.MyInstance.OnPlayerUnitDespawn -= HandlePlayerUnitDespawn;
     base.CleanupEventSubscriptions();
 }
Пример #3
0
        private void CleanupEventSubscriptions()
        {
            //Debug.Log("UnitSpawnNode.CleanupEventSubscriptions()");
            if (!eventSubscriptionsInitialized)
            {
                return;
            }

            if (SystemEventManager.MyInstance != null)
            {
                SystemEventManager.StopListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
            }

            eventSubscriptionsInitialized = false;
        }
Пример #4
0
 private void CleanupEventSubscriptions()
 {
     ////Debug.Log("PlayerManager.CleanupEventSubscriptions()");
     if (!eventSubscriptionsInitialized)
     {
         return;
     }
     if (systemEventManager != null)
     {
         systemEventManager.OnTakeDamage -= HandleTakeDamage;
         SystemEventManager.StopListening("OnPlayerConnectionSpawn", handlePlayerConnectionSpawn);
         SystemEventManager.StopListening("OnPlayerConnectionDespawn", handlePlayerConnectionDespawn);
     }
     eventSubscriptionsInitialized = false;
 }
 private void CleanupEventSubscriptions()
 {
     //Debug.Log("MiniMapIndicatorController.CleanupEventSubscriptions()");
     if (!eventSubscriptionsInitialized)
     {
         return;
     }
     SystemEventManager.StopListening("OnLevelUnload", HandleLevelUnload);
     foreach (InteractableOptionComponent _interactable in interactable.Interactables)
     {
         if (_interactable.HasMiniMapIcon() || _interactable.HasMiniMapText())
         {
             _interactable.MiniMapStatusUpdateHandler -= HandleMiniMapStatusUpdate;
         }
     }
     eventSubscriptionsInitialized = false;
 }
Пример #6
0
 public override void CleanupEventSubscriptions()
 {
     if (!eventSubscriptionsInitialized)
     {
         return;
     }
     base.CleanupEventSubscriptions();
     if (SystemEventManager.MyInstance != null)
     {
         SystemEventManager.MyInstance.OnLevelChanged -= UpdateAbilityList;
         SystemEventManager.StopListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
         SystemEventManager.MyInstance.OnPlayerUnitDespawn -= HandleCharacterUnitDespawn;
     }
     // that next code would have never been necessary because that handler was never set : TEST THAT ESCAPE CANCELS SPELLCASTING - THAT METHOD IS NEVER SET
     if (KeyBindManager.MyInstance != null && KeyBindManager.MyInstance.MyKeyBinds != null && KeyBindManager.MyInstance.MyKeyBinds.ContainsKey("CANCEL"))
     {
         KeyBindManager.MyInstance.MyKeyBinds["CANCEL"].OnKeyPressedHandler -= OnEscapeKeyPressedHandler;
     }
 }
Пример #7
0
 public override void CleanupEventSubscriptions()
 {
     if (!eventSubscriptionsInitialized)
     {
         return;
     }
     base.CleanupEventSubscriptions();
     if (PlayerManager.MyInstance != null)
     {
         if (PlayerManager.MyInstance.MyCharacter != null && PlayerManager.MyInstance.MyCharacter.CharacterCombat != null)
         {
             PlayerManager.MyInstance.MyCharacter.CharacterCombat.OnKillEvent -= OnKillEventHandler;
         }
     }
     if (SystemEventManager.MyInstance != null)
     {
         SystemEventManager.MyInstance.OnLevelChanged -= LevelUpHandler;
         //SystemEventManager.MyInstance.OnEquipmentChanged -= OnEquipmentChanged;
         SystemEventManager.StopListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
         SystemEventManager.MyInstance.OnPlayerUnitDespawn -= HandlePlayerUnitDespawn;
     }
     eventSubscriptionsInitialized = false;
 }
Пример #8
0
 public void OnDestroy()
 {
     SystemEventManager.StopListening("OnLevelLoad", HandleLevelLoad);
 }
Пример #9
0
 public void CleanupEventSubscriptions()
 {
     SystemEventManager.StopListening("AfterCameraUpdate", HandleAfterCameraUpdate);
     SystemEventManager.StopListening("OnLevelUnload", HandleLevelUnload);
 }
Пример #10
0
 protected override void ProcessCleanupEventSubscriptions()
 {
     //Debug.Log("UnitSpawnNode.CleanupEventSubscriptions()");
     base.ProcessCleanupEventSubscriptions();
     SystemEventManager.StopListening("OnCurrencyChange", HandleCurrencyChange);
 }
 public void CleanupScriptableObjects()
 {
     SystemEventManager.StopListening("OnReputationChange", HandleReputationChange);
 }