コード例 #1
0
        public void Use(EquipableItem item)
        {
            if (currentInventoryObject.tag == "EquipmentSlot")
            {
                equipmentSlotManager.UnloadEquipmentOnSlot(item, item.slotType);
                equipmentSlotManager.UnloadEquipementOnEquipMenu(item, item.slotType);
                item.equipped = false;
                modHandler.RemoveAllModifiers(item);
                inventoryHandler.AddItem(item);
                characterStats.SetMaxAPFromStamina();
                characterStats.SetMaxHealthFromVitality();
            }

            else
            {
                equipmentSlotManager.LoadEquipmentOnSlot(item, item.slotType);
                equipmentSlotManager.LoadEquipementOnEquipMenu(item, item.slotType);
                item.equipped = true;
                modHandler.ApplyEquipmentModifiers(item);
                characterStats.SetMaxAPFromStamina();
                characterStats.SetMaxHealthFromVitality();
            }
            statpreview.updateStatTexts();
        }
コード例 #2
0
ファイル: EquipableItem.cs プロジェクト: BYZ007/MorganBoGame
 public override void Use()
 {
     Initialize();
     equipmentSlotManager.LoadEquipmentOnSlot(this, slotType);
     equipmentSlotManager.LoadEquipementOnEquipMenu(this, slotType);
 }