feat: 新增英雄基础属性存档与UI属性加成显示
1. 新增base_ap和base_hp属性存储英雄原始基础攻防属性 2. 实现属性加成差值显示,展示当前属性与基础属性的差异 3. 重构英雄信息UI,新增名字、关闭按钮等节点绑定 4. 调整英雄预制体布局,适配新的UI展示需求 5. 补充战斗触发类型注释文档
This commit is contained in:
@@ -23,6 +23,8 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
type: number = 0; // 0近战 1远程 2辅助
|
||||
fac: number = 0; // 0:hero 1:monster
|
||||
// ==================== 基础属性(有初始值) ====================
|
||||
base_ap: number = 0; // 原始基础攻击(无任何加成)
|
||||
base_hp: number = 0; // 原始基础血量(无任何加成)
|
||||
ap: number = 0; // 基础攻击
|
||||
hp: number = 100; // 基础血量
|
||||
hp_max: number = 100; // 最大血量
|
||||
@@ -309,6 +311,8 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
this.lv = 1;
|
||||
this.type = 0;
|
||||
this.fac = 0;
|
||||
this.base_ap = 0;
|
||||
this.base_hp = 0;
|
||||
this.ap = 0;
|
||||
this.hp = 100;
|
||||
this.hp_max = 100;
|
||||
|
||||
Reference in New Issue
Block a user