mirror of
https://github.com/DerTyp7/harvestdale-unity.git
synced 2025-10-30 13:07:10 +01:00
tools
This commit is contained in:
25
Assets/Scripts/Items/Item.cs
Normal file
25
Assets/Scripts/Items/Item.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
[CreateAssetMenu(fileName = "Item", menuName = "Harvestdale/Items/Item", order = 0)]
|
||||
public class Item : ScriptableObject
|
||||
{
|
||||
public string uuid;
|
||||
public string itemName;
|
||||
|
||||
public Sprite sprite;
|
||||
|
||||
[Tooltip("Tools will set this to false on Awake()")]
|
||||
public bool stackable = true;
|
||||
public int maxStackSize = 100;
|
||||
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (!stackable)
|
||||
{
|
||||
maxStackSize = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user