42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
import { _decorator,NodeEventType,EventTouch } 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 { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
|
import { UIID } from "../common/config/GameUIConfig";
|
|
import { smc } from "../common/SingletonModuleComp";
|
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
/** 视图层对象 */
|
|
@ccclass('CsuoComp')
|
|
@ecs.register('Csuo', false)
|
|
export class CsuoComp extends CCComp {
|
|
|
|
protected onLoad() {
|
|
// this.node.on(NodeEventType.TOUCH_START, this.onTouch, this);
|
|
|
|
}
|
|
onTouch() {
|
|
|
|
}
|
|
onOk(){
|
|
this.node.active=false;
|
|
}
|
|
oncancel(){
|
|
|
|
|
|
}
|
|
|
|
/** 视图层逻辑代码分离演示 */
|
|
start() {
|
|
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
|
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
|
}
|
|
|
|
|
|
|
|
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
reset() {
|
|
this.node.destroy();
|
|
}
|
|
} |