-
Creator 版本:2.4.10
-
目标平台:微信小游戏真机
-
重现方式:①点击按住不移动;②点击不移动,立刻抬起。以上两种情况在华为手机中都会出现(猜测跟鸿蒙系统有关,没有条件测试其它品牌的鸿蒙系统手机),安卓和iOS的没问题,不移动的情况下不会回调TOUCH_MOVE.
-
首个报错: 无报错
-
手机型号: 华为P30
-
重现概率: 必现
const {ccclass, property} = cc._decorator;
@ccclass
export default class test extends cc.Component {
@property(cc.Label)
touchTip: cc.Label = null;
@property(cc.Node)
touchNode: cc.Node = null;
// LIFE-CYCLE CALLBACKS:
onLoad () {
this.touchNode.on(cc.Node.EventType.TOUCH_START, this.touchStart, this);
this.touchNode.on(cc.Node.EventType.TOUCH_MOVE, this.touchMove, this);
this.touchNode.on(cc.Node.EventType.TOUCH_END, this.touchEnd, this);
}
private touchStart() {
this.touchTip.string = "touchStart";
}
private touchMove() {
this.touchTip.string = "touchMove";
}
private touchEnd() {
this.touchTip.string = "touchEnd";
}
}
oppo K3打包原生也会这样,点击不移动也会触发touchmove,同测试的小米手机不会触发。最后就加了个判断,移动距离大于1就算进touchmove