Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88737

获取触摸点坐标怎么从监听中提取出来,用来做逻辑手势判断

$
0
0

@2311359055 写道:

this.node.on(cc.Node.EventType.TOUCH_START, function (event) {
this.gesteStart = event.touch.getLocation();
}
this.node.on(cc.Node.EventType.TOUCH_END, function (event) {
this.gesteEnd = event.touch.getLocation();
}
cc.log(this.gesteStart.x);
cc.log(this.gesteEnd.x);
错误是:gesteStart.x is not defined,这个要在监听里面写才能用

帖子: 5

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>