修复ModuleView.ts与ModuleViewVM.ts模板中的引用错误问题

This commit is contained in:
dgflash
2022-07-14 23:16:00 +08:00
parent 0f8e5f5ca2
commit 4e2847f0ab
3 changed files with 11 additions and 11 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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();
}