41 lines
742 B
C#
41 lines
742 B
C#
using UnityEngine;
|
|
|
|
// Example: GameItem.cs
|
|
[CreateAssetMenu(fileName = "ToolItem", menuName = "Game Data/Tool")]
|
|
public class ToolItem : GameItem
|
|
{
|
|
// tool type enum
|
|
public enum ToolType
|
|
{
|
|
Mining,
|
|
Woodcutting,
|
|
Fishing,
|
|
Hunting,
|
|
Watering,
|
|
Harvesting,
|
|
Cooking,
|
|
Smithing,
|
|
Alchemy,
|
|
Enchanting,
|
|
Repairing,
|
|
Crafting,
|
|
None
|
|
}
|
|
|
|
public ToolType toolType;
|
|
|
|
public int durability;
|
|
|
|
public int maxDurability;
|
|
|
|
public int range;
|
|
public int power;
|
|
public int speed;
|
|
public int efficiency;
|
|
|
|
// set type to Tool when creating a new ToolItem
|
|
public ToolItem()
|
|
{
|
|
type = ItemType.Tool;
|
|
}
|
|
} |