47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
// Example: GameItem.cs
|
|
|
|
|
|
using Types.Items;
|
|
using UnityEngine;
|
|
|
|
namespace Data.ScriptableObjects.Items
|
|
{
|
|
[CreateAssetMenu(fileName = "CropItem", menuName = "Game Data/Crop")]
|
|
public class CropItemSo : GameItemSo
|
|
|
|
{
|
|
public int experience;
|
|
|
|
// set the type of crop on instantiation
|
|
public CropItemSo()
|
|
{
|
|
type = ItemType.Crop;
|
|
}
|
|
|
|
public new CropItem Clone()
|
|
{
|
|
var clone = new CropItem
|
|
{
|
|
ItemName = itemName,
|
|
Icon = icon,
|
|
ItemValue = itemValue,
|
|
Rarity = rarity,
|
|
Quantity = quantity,
|
|
StackSize = stackSize,
|
|
SellValue = sellValue,
|
|
IsStackable = isStackable,
|
|
IsEquippable = isEquippable,
|
|
IsConsumable = isConsumable,
|
|
IsQuestItem = isQuestItem,
|
|
IsKeyItem = isKeyItem,
|
|
IsCraftable = isCraftable,
|
|
IsTradeable = isTradeable,
|
|
IsSellable = isSellable,
|
|
IsDroppable = isDroppable,
|
|
IsDestroyable = isDestroyable,
|
|
Experience = experience
|
|
};
|
|
return clone;
|
|
}
|
|
}
|
|
} |