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; }
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(); }
private void CleanupEventSubscriptions() { //Debug.Log("UnitSpawnNode.CleanupEventSubscriptions()"); if (!eventSubscriptionsInitialized) { return; } if (SystemEventManager.MyInstance != null) { SystemEventManager.StopListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn); } eventSubscriptionsInitialized = false; }
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; }
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; } }
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; }
public void OnDestroy() { SystemEventManager.StopListening("OnLevelLoad", HandleLevelLoad); }
public void CleanupEventSubscriptions() { SystemEventManager.StopListening("AfterCameraUpdate", HandleAfterCameraUpdate); SystemEventManager.StopListening("OnLevelUnload", HandleLevelUnload); }
protected override void ProcessCleanupEventSubscriptions() { //Debug.Log("UnitSpawnNode.CleanupEventSubscriptions()"); base.ProcessCleanupEventSubscriptions(); SystemEventManager.StopListening("OnCurrencyChange", HandleCurrencyChange); }
public void CleanupScriptableObjects() { SystemEventManager.StopListening("OnReputationChange", HandleReputationChange); }