UnityBiz/Assets/scripts/Inventory/Item.cs
adamwi1000 b854205dcb test
2024-08-02 06:41:41 +02:00

33 lines
640 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Item : MonoBehaviour
{
public enum ItemType
{
BluePotion,
UnicornHorn,
}
public ItemType itemType;
public int amount;
public Sprite GetSprite()
{
switch (itemType)
{
default:
case ItemType.BluePotion: return ItemAssets.Instance.PotionBlueSprite;
}
}
public void AddAmount(int amountToAdd)
{
amount += amountToAdd;
}
public void RemoveAmount(int amountToRemove)
{
amount -= amountToRemove;
}
}