游戏开始 初始技能功能 继续完善

This commit is contained in:
2025-06-04 17:16:43 +08:00
parent 899613c689
commit b26efd07fd
11 changed files with 6673 additions and 2395 deletions

View File

@@ -0,0 +1,29 @@
import { _decorator } 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 { GameEvent } from "../common/config/GameEvent";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('EquipsCompComp')
@ecs.register('EquipsComp', false)
export class EquipsCompComp extends CCComp {
/** 视图层逻辑代码分离演示 */
onLoad() {
this.on(GameEvent.UseSkillCard, this.get_skill, this);
}
update(dt: number): void {
}
get_skill(){
console.log("get_skill")
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
this.node.destroy();
}
}