/// <summary> /// Saves the given ItemButton as the equipped item, saves the item it holds and updates the old ItemButton /// </summary> /// <param name="itemButton">The new equipped itemButton (that holds the equipped item)</param> public void SetCurrentlyEquipped(ItemButton itemButton) { CurrentlyEquippedItem = itemButton ? (Equipable)itemButton.Item : null; UIManager.Instance.WearingIndicator.SetIcon(itemButton ? itemButton.Item.Icon : null); if (_currentlyEquippedItemButton != null) { _currentlyEquippedItemButton.Unequip(); } _currentlyEquippedItemButton = itemButton; }