2025-02-17 16:45:22 +08:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using Sirenix.OdinInspector;
|
2025-02-12 17:53:59 +08:00
|
|
|
|
|
|
|
namespace Game
|
|
|
|
{
|
2025-02-17 16:45:22 +08:00
|
|
|
[System.Serializable]
|
|
|
|
public class EquipmentConfig
|
|
|
|
{
|
|
|
|
[LabelText("装备名称")] public string Name; // 装备名称
|
|
|
|
[LabelText("装备描述")] public string Description; // 装备描述
|
|
|
|
[LabelText("装备类型")] public EquipmentType Type; // 装备类型(基础装备、合成装备)
|
|
|
|
[LabelText("装备的属性加成")] public List<StatModifier> Stats; // 装备的属性加成(攻击力、生命值等)
|
|
|
|
[LabelText("装备附带的技能效果")] public List<Effect> Effects; // 装备附带的技能效果
|
|
|
|
}
|
|
|
|
|
2025-02-12 17:53:59 +08:00
|
|
|
/// <summary>
|
2025-02-17 16:45:22 +08:00
|
|
|
/// 装备类型
|
|
|
|
/// </summary>
|
|
|
|
public enum EquipmentType
|
|
|
|
{
|
|
|
|
[LabelText("基础装备")] Base = 0,
|
|
|
|
[LabelText("合成装备")] Composite // 合成装备
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 装备的属性加成
|
2025-02-12 17:53:59 +08:00
|
|
|
/// </summary>
|
2025-02-14 17:55:40 +08:00
|
|
|
[System.Serializable]
|
2025-02-17 16:45:22 +08:00
|
|
|
public class StatModifier
|
|
|
|
{
|
|
|
|
[LabelText("属性加成类型")] public StatType StatType; // 攻击力、生命值等
|
|
|
|
[LabelText("属性加成数值")] public float Value; // 数值
|
|
|
|
|
|
|
|
public StatModifier(StatType statType, float value)
|
|
|
|
{
|
|
|
|
StatType = statType;
|
|
|
|
Value = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 属性加成类型
|
|
|
|
/// </summary>
|
|
|
|
public enum StatType
|
|
|
|
{
|
|
|
|
[LabelText("攻击伤害")] AttackDamage = 0,
|
|
|
|
[LabelText("护甲")] Armor,
|
|
|
|
[LabelText("魔法抗性")] MagicResist,
|
|
|
|
[LabelText("血量")] Health,
|
|
|
|
[LabelText("攻击速度")] AttackSpeed,
|
|
|
|
[LabelText("法术强度")] AbilityPower
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 特效
|
|
|
|
/// </summary>
|
|
|
|
[System.Serializable]
|
|
|
|
public class Effect
|
|
|
|
{
|
|
|
|
[LabelText("特效名称")] public string Name; // 特效名称
|
|
|
|
[LabelText("特效描述")] public string Description; // 特效描述
|
|
|
|
[LabelText("特效类型")] public EffectType EffectType; // 特效类型
|
|
|
|
[LabelText("特效的数值")] public float Value; // 特效的数值
|
|
|
|
|
|
|
|
public Effect(string name, string description, EffectType effectType, float value)
|
|
|
|
{
|
|
|
|
Name = name;
|
|
|
|
Description = description;
|
|
|
|
EffectType = effectType;
|
|
|
|
Value = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 特效类型
|
|
|
|
/// </summary>
|
|
|
|
public enum EffectType
|
2025-02-12 17:53:59 +08:00
|
|
|
{
|
2025-02-17 16:45:22 +08:00
|
|
|
[LabelText("攻击")] OnAttack = 0,
|
|
|
|
[LabelText("受伤")] OnHit,
|
|
|
|
[LabelText("被动")] Passive,
|
|
|
|
[LabelText("死亡")] OnDeath,
|
|
|
|
[LabelText("活着")] Active
|
2025-02-12 17:53:59 +08:00
|
|
|
}
|
|
|
|
}
|