evershade/Assets/Data/ScriptableObjects/Items/ToolItemSo.cs

60 lines
1.6 KiB
C#

// Example: GameItem.cs
// [CreateAssetMenu(fileName = "ToolItem", menuName = "Game Data/Tool")]
using Types.Items;
namespace Data.ScriptableObjects.Items
{
public class ToolItemSo : GameItemSo
{
public int durability;
public int efficiency;
public int maxDurability;
public int power;
public int range;
public int speed;
public ToolType toolType;
// set type to Tool when creating a new ToolItem
public ToolItemSo()
{
type = ItemType.Tool;
}
public new ToolItem Clone()
{
var clone = new ToolItem
{
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,
ToolType = toolType,
Durability = durability,
MaxDurability = maxDurability,
Range = range,
Power = power,
Speed = speed,
Efficiency = efficiency
};
return clone;
}
}
}