added inventory and stamina system

This commit is contained in:
2026-02-17 15:38:46 +00:00
parent 8b975163a0
commit 27f2931ce1
43 changed files with 2980 additions and 250 deletions

View 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 = "";
}