feat(map): add skill small icon component and update prefab
新增技能小图标组件SinfoComp,同步更新对应UI预制件SInfoBox,添加关闭按钮与图标显示节点,完善战场技能状态展示能力
This commit is contained in:
25
assets/script/game/map/SinfoComp.ts
Normal file
25
assets/script/game/map/SinfoComp.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { _decorator, Node, Sprite, Label } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/**
|
||||
* 技能小图标组件
|
||||
*
|
||||
* 由 MissSkillsComp.addSkill() 实例化并初始化。
|
||||
* 在战场上以图标 + 剩余次数的形式呈现。
|
||||
*/
|
||||
@ccclass('SinfoComp')
|
||||
@ecs.register('SinfoComp', false)
|
||||
export class SinfoComp extends CCComp {
|
||||
|
||||
|
||||
|
||||
|
||||
/** ECS 组件移除时销毁节点 */
|
||||
reset() {
|
||||
if (this.node && this.node.isValid) {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user