html52.com
我爱小程序-开发者交流社区

小游戏 onTouch事件有概率在被重新编译的时候不起作用

问题模块 框架类型 问题类型 操作系统 工具版本
开发者工具 小游戏 Bug macOS 1

//开启拾取

console.log("开启Start");

wx.onTouchStart(

function (res) {

//console.log(res);

//console.log(this._Scale);

let pos = res.changedTouches[0];

let x = pos.pageX / this._Scale * 2, y = pos.pageY / this._Scale * 2;

this._CurrentPage.Over(x,y,res);

}.bind(this)

);


已经调用了 onTouchStart,而且已经输出“开启Start”,但开发者工具中点击重新“编译”,又概率发生接收不到Touch事件

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付