- Refactor items from predefined scriptables only, to template based into item instances - Added equipped item tooltip to facilitate comparing items - Added modular craftable items
25 lines
621 B
C#
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);
|
|
}
|
|
|
|
}
|
|
|
|
}
|