added inventory and stamina system
This commit is contained in:
28
Assets/Scripts/ItemDefinition.cs
Normal file
28
Assets/Scripts/ItemDefinition.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Create via right-click → Create → OGG → Item Definition
|
||||
/// Drag onto PickupItem components in the scene.
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "New Item", menuName = "OGG/Item Definition")]
|
||||
public class ItemDefinition : ScriptableObject
|
||||
{
|
||||
public enum ItemType { Misc, Consumable, Weapon }
|
||||
|
||||
[Header("Identity")]
|
||||
public string itemName = "Unnamed Item";
|
||||
public Sprite icon;
|
||||
public ItemType type = ItemType.Misc;
|
||||
|
||||
[Header("Weapon (only if type == Weapon)")]
|
||||
[Tooltip("The prefab that gets spawned in the weapon holder when this is equipped.")]
|
||||
public GameObject weaponPrefab;
|
||||
|
||||
[Header("Equipment")]
|
||||
[Tooltip("If true, this item can be equipped/unequipped from the inventory even if it isn't a weapon.")]
|
||||
public bool isEquippable = false;
|
||||
|
||||
[Header("Flavour")]
|
||||
[TextArea(2, 4)]
|
||||
public string description = "";
|
||||
}
|
||||
Reference in New Issue
Block a user