Files
Gen_Hack-and-Slash-Roguelit…/Client/Assets/Scripts/Data/WeaponDef.cs

21 lines
600 B
C#
Raw Normal View History

2025-08-26 16:00:58 +08:00
namespace Data
{
public enum WeaponType
{
Melee, // 近战武器
Ranged // 远程武器
}
public class WeaponDef : ItemDef
{
public WeaponType type = WeaponType.Melee;
public AttributesDef attributes;
public BulletDef bullet;
public DrawNodeDef attackAnimation;
public float attackDetectionTime = 0;
2025-08-26 16:00:58 +08:00
public WeaponDef() // 构造函数,用于设置武器的默认属性
{
maxStack = 1; // 武器默认最大堆叠为1
ssEquippable = true; // 武器默认可装备
}
}
}