feat(地图): 为英雄信息组件添加图标节点属性

在 HInfoComp 组件中新增 icon_node 属性,用于在预制件中引用图标节点。同时更新了 hnode.prefab 的配置,添加了对应的 Sprite 和 Animation 组件,以支持英雄图标的显示和动画效果。
This commit is contained in:
walkpan
2026-03-25 20:37:12 +08:00
parent d5d763a6ef
commit f436e47d8d
2 changed files with 81 additions and 7 deletions

View File

@@ -3,12 +3,14 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { HeroAttrsComp } from "../hero/HeroAttrsComp";
const { ccclass } = _decorator;
const {property, ccclass } = _decorator;
/** 视图层对象 */
@ccclass('HInfoComp')
@ecs.register('HInfoComp', false)
export class HInfoComp extends CCComp {
@property(Node)
icon_node=null!
private eid: number = 0;
private model: HeroAttrsComp | null = null;
private apLabel: Label | null = null;