private void OnDestroy() { if (_instance == this) { _instance = null; } UserInventory.Instance.RefreshEvent -= OnInventoryRefresh; }
public void OnItemClicked() { if (_itemInformation == null) { return; } InventoryItemInfoMobile.ShowItem(_itemInformation); }
private void Awake() { _instance = this; var closeFullscreenButton = FullscreenUI.GetComponent <ButtonProvider>()?.Button; if (closeFullscreenButton != null) { closeFullscreenButton.onClick += () => { ShowUI(false); _instance.consumeButton.counter.ResetValue(); } } ; UserInventory.Instance.RefreshEvent += OnInventoryRefresh; }