Пример #1
0
        void OnDestroy()
        {
            _simpleEvents.Detach(Player.PLAYER_UPDATE_STATS, OnStatsUpdate);
            _simpleEvents.Detach(Player.PLAYER_GET_DAMAGE, OnGetDamage);
            _simpleEvents = null;

            InventoryPanel.QuickSlotsPanel.OnSlotClickAction -= OnQuickSlotClick;
            InventoryPanel.OnSlotClickAction -= OnInventorySlotClick;

            if (CurrencyManager.OnChangeCurrency != null)
            {
                CurrencyManager.OnChangeCurrency -= UpdateBalance;
            }
        }
Пример #2
0
 void OnDestroy()
 {
     _simpleEvents.Detach(Player.PLAYER_UNDER_WATER, OnUnderWater);
     _simpleEvents.Detach(Inventory.INVENTORY_ADD_ITEM, OnAddItemToInventory);
     _simpleEvents = null;
 }