touch事件在小游戏平台真机掉帧严重

  • Creator 版本: 3.3.0

  • 目标平台: 字节跳动小游戏开发工具真机调试

  • 重现方式: helloworld空项目 添加2D的Canvas 添加脚本注册4个touch事件 空方法 打包小游戏使用真机调试,滑动屏幕时掉帧严重。

  • 首个报错:

  • 之前哪个版本是正常的: 3.0.0

  • 手机型号: 小米8 华为荣耀20

  • 编辑器操作系统: windows

  • 重现概率: 必现

@ccclass(‘Scene’)

export class Scene extends Component {

// [1]

// dummy = '';

// [2]

// @property

// serializableDummy = 0;

@property(Label)

lb_touch: Label = null!;

onLoad() {

    this.node.on(Node.EventType.TOUCH_START, (event: any) => { this.OnTouchStart(event); }, this);

    this.node.on(Node.EventType.TOUCH_MOVE, (event: any) => { this.OnTouchMove(event); }, this)

    this.node.on(Node.EventType.TOUCH_END, (event: any) => { this.OnTouchEnd(event); }, this)

    this.node.on(Node.EventType.TOUCH_CANCEL, (event: any) => { this.OnTouchCancel(event); }, this)

}

start() {

    // [3]

}

OnTouchStart(e: any) {

    this.lb_touch.string = "开始滑动";

}

OnTouchMove(e: any) {

}

OnTouchEnd(e: any) {

    this.lb_touch.string = "结束滑动";

}

OnTouchCancel(e: any) {

    this.lb_touch.string = "结束滑动";

}

// update (deltaTime: number) {

//     // [4]

// }

}