RiftMayhem/Assets/Scripts/Drops/EquippableItemDrop.cs
Pedro Gomes 74a9c2b940 Major rework on items
- Refactor items from predefined scriptables only, to template based into item instances
- Added equipped item tooltip to facilitate comparing items
- Added modular craftable items
2025-01-03 19:40:35 +00:00

25 lines
621 B
C#

using Kryz.CharacterStats.Examples;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EquippableItemDrop : Interactable
{
public ItemInstance itemDrop;
public override void Interact(bool melee)
{
base.Interact(melee);
Debug.Log("Interacting with item: " + this.name + " " + itemDrop.ItemName);
if (FindObjectOfType<Inventory>().AddItem(itemDrop))
{
Debug.Log("Interacting with item: " + this.name + " " + itemDrop.ItemName + " found inventory and added it");
Destroy(this.gameObject);
}
}
}