mirror of
https://github.com/DerTyp7/harvestdale-unity.git
synced 2026-07-31 13:59:03 +02:00
d
This commit is contained in:
@@ -6,7 +6,35 @@ using System.Collections.Generic;
|
||||
[CreateAssetMenu(fileName = "Crop", menuName = "Harvestdale/Items/Crop", order = 0)]
|
||||
public class Crop : Item
|
||||
{
|
||||
public int daysToGrow;
|
||||
public List<Sprite> sprites = new List<Sprite>();
|
||||
public Harvest harvest;
|
||||
[SerializeField]
|
||||
private List<Sprite> sprites = new List<Sprite>();
|
||||
|
||||
[SerializeField]
|
||||
private Harvest harvestItem;
|
||||
|
||||
[SerializeField]
|
||||
private Season seasonToPlant;
|
||||
|
||||
[SerializeField]
|
||||
private Season seasonToHarvest;
|
||||
|
||||
public List<Sprite> Sprites
|
||||
{
|
||||
get { return sprites; }
|
||||
}
|
||||
|
||||
public Harvest HarvestItem
|
||||
{
|
||||
get { return harvestItem; }
|
||||
}
|
||||
|
||||
public Season SeasonToPlant
|
||||
{
|
||||
get { return seasonToPlant; }
|
||||
}
|
||||
|
||||
public Season SeasonToHarvest
|
||||
{
|
||||
get { return seasonToHarvest; }
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,14 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
[CreateAssetMenu(fileName = "Harvest", menuName = "Harvestdale/Items/Harvest", order = 0)]
|
||||
public class Harvest : Item
|
||||
{
|
||||
[SerializeField]
|
||||
private int price;
|
||||
|
||||
public int Price
|
||||
{
|
||||
get { return price; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,21 +3,28 @@ using UnityEngine;
|
||||
[CreateAssetMenu(fileName = "Item", menuName = "Harvestdale/Items/Item", order = 0)]
|
||||
public class Item : ScriptableObject
|
||||
{
|
||||
public string uuid;
|
||||
public string itemName;
|
||||
[SerializeField]
|
||||
private string uuid;
|
||||
|
||||
public Sprite sprite;
|
||||
[SerializeField]
|
||||
private string itemName;
|
||||
|
||||
[Tooltip("Tools will set this to false on Awake()")]
|
||||
public bool stackable = true;
|
||||
public int maxStackSize = 100;
|
||||
[SerializeField]
|
||||
private Sprite icon;
|
||||
|
||||
|
||||
private void OnEnable()
|
||||
public string UUID
|
||||
{
|
||||
if (!stackable)
|
||||
{
|
||||
maxStackSize = 1;
|
||||
}
|
||||
get { return uuid; }
|
||||
}
|
||||
|
||||
public string ItemName
|
||||
{
|
||||
get { return itemName; }
|
||||
}
|
||||
|
||||
public Sprite Icon
|
||||
{
|
||||
get { return icon; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user