32 lines
677 B
C#
32 lines
677 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TRInventoryUpdatable;
|
|
|
|
public class InventoryItem : MonoBehaviour
|
|
{
|
|
//public int placeOnList;
|
|
//public string itemDescription = "∞";
|
|
|
|
//private void Awake()
|
|
//{
|
|
// UpdateItemDescription();
|
|
//}
|
|
|
|
public void UpdateItemDescription()
|
|
{
|
|
var updatable = transform.GetComponent<InventoryUpdatable>();
|
|
if (updatable == null) return;
|
|
|
|
updatable.InventoryUpdate();
|
|
}
|
|
|
|
public void UseItem()
|
|
{
|
|
var updatable = transform.GetComponent<IUsable>();
|
|
if (updatable == null) return;
|
|
|
|
updatable.Use();
|
|
}
|
|
}
|