From 4e2847f0abe1c4c170b2d3378eb7d6d7287779a4 Mon Sep 17 00:00:00 2001 From: dgflash Date: Thu, 14 Jul 2022 23:16:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DModuleView.ts=E4=B8=8EModuleV?= =?UTF-8?q?iewVM.ts=E6=A8=A1=E6=9D=BF=E4=B8=AD=E7=9A=84=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../asset-template/typescript/ModuleView.ts | 2 +- .../asset-template/typescript/ModuleViewVM.ts | 2 +- .../assets/core/common/texture/RtToSprite.ts | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.creator/asset-template/typescript/ModuleView.ts b/.creator/asset-template/typescript/ModuleView.ts index 8c49497..aa52a78 100644 --- a/.creator/asset-template/typescript/ModuleView.ts +++ b/.creator/asset-template/typescript/ModuleView.ts @@ -1,6 +1,6 @@ import { _decorator } from "cc"; import { ecs } from "../../../../../extensions/oops-framework/assets/libs/ecs/ECS"; -import { CCComp } from "../../common/ecs/view/CCComp"; +import { CCComp } from "../../common/ecs/CCComp"; const { ccclass, property } = _decorator; diff --git a/.creator/asset-template/typescript/ModuleViewVM.ts b/.creator/asset-template/typescript/ModuleViewVM.ts index 8b8701a..1be5fe8 100644 --- a/.creator/asset-template/typescript/ModuleViewVM.ts +++ b/.creator/asset-template/typescript/ModuleViewVM.ts @@ -1,6 +1,6 @@ import { _decorator } from "cc"; import { ecs } from "../../../../../extensions/oops-framework/assets/libs/ecs/ECS"; -import { CCVMParentComp } from "../../common/ecs/view/CCVMParentComp"; +import { CCVMParentComp } from "../../common/ecs/CCVMParentComp"; const { ccclass, property } = _decorator; diff --git a/extensions/oops-framework/assets/core/common/texture/RtToSprite.ts b/extensions/oops-framework/assets/core/common/texture/RtToSprite.ts index 42fc29a..729f0fa 100644 --- a/extensions/oops-framework/assets/core/common/texture/RtToSprite.ts +++ b/extensions/oops-framework/assets/core/common/texture/RtToSprite.ts @@ -1,4 +1,4 @@ -import { Camera, Component, EventTouch, gfx, Node, RenderTexture, Sprite, SpriteFrame, SystemEventType, UITransform, Vec3, _decorator } from 'cc'; +import { Camera, Component, EventTouch, gfx, Node, RenderTexture, Sprite, SpriteFrame, UITransform, Vec3, _decorator } from 'cc'; const { ccclass, property } = _decorator; /** 三维模型显示到二维精灵上 */ @@ -39,10 +39,10 @@ export class RtToSprite extends Component { this.refreshRenderTexture(size.width, size.height); if (this.rotation) { - this.sprite!.node.on(SystemEventType.TOUCH_START, this.onTouchStart, this); - this.sprite!.node.on(SystemEventType.TOUCH_MOVE, this.onTouchMove, this); - this.sprite!.node.on(SystemEventType.TOUCH_END, this.onTouchEnd, this); - this.sprite!.node.on(SystemEventType.TOUCH_CANCEL, this.onTouchEnd, this); + this.sprite!.node.on(Node.EventType.TOUCH_START, this.onTouchStart, this); + this.sprite!.node.on(Node.EventType.TOUCH_MOVE, this.onTouchMove, this); + this.sprite!.node.on(Node.EventType.TOUCH_END, this.onTouchEnd, this); + this.sprite!.node.on(Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this); } } @@ -95,10 +95,10 @@ export class RtToSprite extends Component { onDestroy() { if (this.rotation) { - this.sprite!.node.off(SystemEventType.TOUCH_START, this.onTouchStart, this); - this.sprite!.node.off(SystemEventType.TOUCH_MOVE, this.onTouchMove, this); - this.sprite!.node.off(SystemEventType.TOUCH_END, this.onTouchEnd, this); - this.sprite!.node.off(SystemEventType.TOUCH_CANCEL, this.onTouchEnd, this); + this.sprite!.node.off(Node.EventType.TOUCH_START, this.onTouchStart, this); + this.sprite!.node.off(Node.EventType.TOUCH_MOVE, this.onTouchMove, this); + this.sprite!.node.off(Node.EventType.TOUCH_END, this.onTouchEnd, this); + this.sprite!.node.off(Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this); } this.rt.destroy(); }