refactor(hero): 优化英雄描述文本展示逻辑与UI布局
1. 重构英雄组件富文本生成逻辑,直接使用配置表手写文案替代动态生成 2. 更新英雄配置表中的技能描述文本,优化表述更贴合实际效果 3. 调整任务面板和英雄预制体的UI位置与尺寸,适配新的展示内容 4. 移除冗余的空引用属性,新增刷新石数量显示节点
This commit is contained in:
@@ -21,7 +21,6 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { CardConfig, CardType } from "../common/config/CardSet";
|
||||
import { HeroInfo } from "../common/config/heroSet";
|
||||
import { buildSkillDescRich } from "../common/config/HeroSkillDesc";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
@@ -67,7 +66,7 @@ export class CHeroComp extends CCComp {
|
||||
@property(Label)
|
||||
private fied3: Label = null;
|
||||
|
||||
/** 描述富文本(多行,数值绿色高亮、技能名蓝色,由 buildSkillDescRich 生成) */
|
||||
/** 描述富文本(单条,直接展示 heroSet.info 手写文案) */
|
||||
@property(RichText)
|
||||
private info_rich: RichText = null;
|
||||
|
||||
@@ -288,9 +287,9 @@ export class CHeroComp extends CCComp {
|
||||
// 背景:按 card_lv 激活对应颜色子节点(1→green 2→blue 3→purple 4→red 5→yellow)
|
||||
this.updateBgNode();
|
||||
|
||||
// 描述富文本(英雄触发技能,数值随等级配置高亮)
|
||||
// 描述富文本:直接取 heroSet 的 info 字段(单条手写文案)
|
||||
if (this.info_rich) {
|
||||
const desc = hero ? buildSkillDescRich(hero) : (this.cardData.info || "");
|
||||
const desc = hero?.info || this.cardData.info || "";
|
||||
this.info_rich.string = desc;
|
||||
this.info_rich.node.active = !!desc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user