继续
This commit is contained in:
24
assets/script/game/map/MSkillComp.ts
Normal file
24
assets/script/game/map/MSkillComp.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
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";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('MSkillComp')
|
||||
@ecs.register('MSkillComp', false)
|
||||
export class MSkillComp extends CCComp {
|
||||
|
||||
s_uuid: number = 0;
|
||||
group: number = 0;
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
start() {
|
||||
console.log("MSkillComp start s_uuid:",this.s_uuid,this.group);
|
||||
}
|
||||
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user