- 添加 HlistComp 组件用于展示英雄列表,包含英雄图标、属性显示及翻页按钮 - 在 MissionHomeComp 中增加页面节点和按钮的引用属性,为页面切换功能做准备
43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import { _decorator, Animation, AnimationClip, Button, Event, Label, Node, NodeEventType, Sprite, resources } from "cc";
|
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
|
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
|
import { HeroInfo } from "../common/config/heroSet";
|
|
import { HeroAttrsComp } from "../hero/HeroAttrsComp";
|
|
import { Hero } from "../hero/Hero";
|
|
import { oops } from "db://oops-framework/core/Oops";
|
|
import { UIID } from "../common/config/GameUIConfig";
|
|
import { mLogger } from "../common/Logger";
|
|
|
|
const {property, ccclass } = _decorator;
|
|
|
|
/** 视图层对象 */
|
|
@ccclass('HListComp')
|
|
@ecs.register('HListComp', false)
|
|
export class HListComp extends CCComp {
|
|
@property(Node)
|
|
hero_icon=null!
|
|
@property(Node)
|
|
ap_node=null!
|
|
@property(Node)
|
|
hp_node=null!
|
|
@property(Node)
|
|
info_node=null!
|
|
@property(Node)
|
|
name_node=null!
|
|
|
|
@property(Node)
|
|
pre_btn=null!
|
|
@property(Node)
|
|
next_btn=null!
|
|
huuid:number=null!
|
|
onLoad() {
|
|
|
|
}
|
|
|
|
|
|
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
reset() {
|
|
this.node.destroy();
|
|
}
|
|
}
|