Esempio n. 1
0
 private void Start()
 {
     equipmentSlotManager = GetComponentInChildren <EquipmentSlotManager>();
     foreach (InventorySlot itemSlot in equipmentSlotManager.equipedItems)
     {
         if (itemSlot.item != null)
         {
             equipmentSlotManager.LoadEquipmentOnSlot(itemSlot.item, itemSlot.item.slotType);
         }
     }
 }
Esempio n. 2
0
 private void Start()
 {
     equipmentSlotManager = GetComponentInChildren <EquipmentSlotManager>();
     foreach (InventorySlot itemSlot in equipmentSlotManager.equipedItems)
     {
         if (itemSlot.item != null)
         {
             equipmentSlotManager.LoadEquipmentOnSlot(itemSlot.item, itemSlot.item.slotType);
         }
     }
     foreach (SkinnedMeshRenderer skinRenderer in characterEquipment.GetComponentsInChildren <SkinnedMeshRenderer>())
     {
         baseMeshDict.Add(skinRenderer.gameObject.name, skinRenderer.sharedMesh);
         equipmentsMeshDict.Add(skinRenderer.gameObject.name, skinRenderer);
     }
 }
Esempio n. 3
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();
        }
Esempio n. 4
0
 public override void Use()
 {
     Initialize();
     equipmentSlotManager.LoadEquipmentOnSlot(this, slotType);
     equipmentSlotManager.LoadEquipementOnEquipMenu(this, slotType);
 }