|
@@ -18,6 +18,7 @@ cc.Class({
|
|
|
this.firstX = location.x;
|
|
this.firstX = location.x;
|
|
|
this.firstY = location.y;
|
|
this.firstY = location.y;
|
|
|
},
|
|
},
|
|
|
|
|
+ //以下部分参考用,具体识别用自己的算法
|
|
|
touchEnd:function(event)
|
|
touchEnd:function(event)
|
|
|
{
|
|
{
|
|
|
let touchPoint = event.getLocation();
|
|
let touchPoint = event.getLocation();
|
|
@@ -31,7 +32,6 @@ cc.Class({
|
|
|
//向左函数
|
|
//向左函数
|
|
|
// console.log('left');
|
|
// console.log('left');
|
|
|
this.node.emit("gesture",{name:'left'});
|
|
this.node.emit("gesture",{name:'left'});
|
|
|
- // this.dispatch('touchLeft');
|
|
|
|
|
} else {
|
|
} else {
|
|
|
//向右函数
|
|
//向右函数
|
|
|
// console.log('right');
|
|
// console.log('right');
|