28 lines
707 B
C#
28 lines
707 B
C#
namespace Data
|
||
{
|
||
public enum ItemRarity
|
||
{
|
||
Common,
|
||
Uncommon,
|
||
Rare,
|
||
Epic,
|
||
Legendary
|
||
}
|
||
public class ItemDef : Define
|
||
{
|
||
public ImageDef texture;
|
||
public ItemRarity rarity = ItemRarity.Common;
|
||
public int maxStack = 10; // 最大堆叠数量,默认为10
|
||
public bool ssEquippable = false; // 是否可装备
|
||
}
|
||
|
||
public class WeaponDef : ItemDef
|
||
{
|
||
public AttributesDef attributes;
|
||
public WeaponDef() // 构造函数,用于设置武器的默认属性
|
||
{
|
||
maxStack = 1; // 武器默认最大堆叠为1
|
||
ssEquippable = true; // 武器默认可装备
|
||
}
|
||
}
|
||
} |