refactor(talent): 拆分天赋项组件并适配精灵图标
将原TalentsComp内的单个天赋项UI更新逻辑抽离为独立的TalentItemComp组件实现代码解耦,更新天赋配置将emoji图标替换为精灵图集资源键,重构TalentsComp的天赋列表渲染逻辑适配新的组件化方案
This commit is contained in:
@@ -44,27 +44,27 @@ export const TalentConfig = {
|
||||
|
||||
// 所有天赋定义(使用数组维护)
|
||||
talents: [
|
||||
{ id: TalentType.Attack, name: "攻击", icon: "⚔️", desc: "+{value}%",
|
||||
{ id: TalentType.Attack, name: "攻击", icon: "1006", desc: "+{value}%",
|
||||
maxLevel: 5, values: [3, 6, 9, 12, 15], costs: [1, 1, 2, 2, 3] },
|
||||
{ id: TalentType.Hp, name: "生命", icon: "❤️", desc: "+{value}%",
|
||||
{ id: TalentType.Hp, name: "生命", icon: "1006", desc: "+{value}%",
|
||||
maxLevel: 5, values: [5, 10, 15, 20, 25], costs: [1, 1, 2, 2, 3] },
|
||||
{ id: TalentType.Critical, name: "暴击率", icon: "🔥", desc: "+{value}%",
|
||||
{ id: TalentType.Critical, name: "暴击率", icon: "1006", desc: "+{value}%",
|
||||
maxLevel: 5, values: [2, 4, 6, 8, 10], costs: [1, 1, 2, 2, 3] },
|
||||
{ id: TalentType.WindFury, name: "风怒率", icon: "⚡", desc: "+{value}%",
|
||||
{ id: TalentType.WindFury, name: "风怒率", icon: "1006", desc: "+{value}%",
|
||||
maxLevel: 5, values: [2, 4, 6, 8, 10], costs: [1, 1, 2, 2, 3] },
|
||||
{ id: TalentType.Freeze, name: "冰冻率", icon: "❄️", desc: "+{value}%",
|
||||
{ id: TalentType.Freeze, name: "冰冻率", icon: "1006", desc: "+{value}%",
|
||||
maxLevel: 5, values: [2, 4, 6, 8, 10], costs: [1, 1, 2, 2, 3] },
|
||||
{ id: TalentType.Puncture, name: "穿刺", icon: "🗡️", desc: "+{value}",
|
||||
{ id: TalentType.Puncture, name: "穿刺", icon: "1006", desc: "+{value}",
|
||||
maxLevel: 5, values: [0.2, 0.4, 0.6, 0.8, 1.0], costs: [1, 1, 2, 2, 3] },
|
||||
{ id: TalentType.DeadTrigger, name: "亡语额外触发", icon: "🛡️", desc: "+{value}次",
|
||||
{ id: TalentType.DeadTrigger, name: "亡语额外触发", icon: "1006", desc: "+{value}次",
|
||||
maxLevel: 1, values: [1], costs: [25] },
|
||||
{ id: TalentType.Summon, name: "召唤额外触发", icon: "🛡️", desc: "+{value}次",
|
||||
{ id: TalentType.Summon, name: "召唤额外触发", icon: "1006", desc: "+{value}次",
|
||||
maxLevel: 1, values: [1], costs: [25] },
|
||||
{ id: TalentType.BuyDiscount, name: "购买优惠", icon: "🛒", desc: "-{value}金币",
|
||||
{ id: TalentType.BuyDiscount, name: "购买优惠", icon: "1006", desc: "-{value}金币",
|
||||
maxLevel: 1, values: [1], costs: [10] },
|
||||
{ id: TalentType.RefreshDiscount, name: "刷新优惠", icon: "🔄", desc: "-{value}金币",
|
||||
{ id: TalentType.RefreshDiscount, name: "刷新优惠", icon: "1006", desc: "-{value}金币",
|
||||
maxLevel: 1, values: [1], costs: [10] },
|
||||
{ id: TalentType.SellBonus, name: "出售返还", icon: "💰", desc: "+{value}金币",
|
||||
{ id: TalentType.SellBonus, name: "出售返还", icon: "1006", desc: "+{value}金币",
|
||||
maxLevel: 1, values: [1], costs: [10] }
|
||||
] as TalentInfo[]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user