public void ChangeWeapon() { if (type == Item.ItemType.AXE && UIManager.Instance.inventory.hasWeapon(Item.ItemType.AXE)) { playerAttack.ChangeWeapon(typeof(AxeWeapon)); UpdateWeaponsSlotsImages(); } if (type == Item.ItemType.SLINGSHOT && UIManager.Instance.inventory.hasWeapon(Item.ItemType.SLINGSHOT)) { playerAttack.ChangeWeapon(typeof(SlingshotWeapon)); UpdateWeaponsSlotsImages(); } }