ItemBase.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Sirenix.OdinInspector;
  5. namespace KairoEngine.Inventory
  6. {
  7. public enum ItemType
  8. {
  9. simple,
  10. firearm,
  11. ammo,
  12. instantEffect,
  13. handWeapon
  14. }
  15. [CreateAssetMenu(fileName = "Item", menuName = "KairoEngine/Items/Item", order = 1)]
  16. public class ItemBase : ScriptableObject
  17. {
  18. [Space]
  19. [VerticalGroup("row1/left")]
  20. public ItemType category;
  21. [VerticalGroup("row1/left")]
  22. public string title;
  23. [VerticalGroup("row1/left")]
  24. public int value = 0;
  25. [VerticalGroup("row1/left")]
  26. public bool stackble = false;
  27. [VerticalGroup("row1/left")]
  28. public GameObject prefab;
  29. [VerticalGroup("row1/left")]
  30. public Sprite icon;
  31. [Space]
  32. [HideLabel]
  33. [PreviewField(100, ObjectFieldAlignment.Right)]
  34. [HorizontalGroup("row1", 110), VerticalGroup("row1/right")]
  35. public Sprite image;
  36. [TextArea(4, 5)]
  37. public string description;
  38. }
  39. }