Commit 2d362bb8 authored by yu's avatar yu

1

parent cfa8eccf
......@@ -235,6 +235,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
private onTouchCancel(e) {
if (!this.isClick || !this.touching) return;
let target: cc.Node = e.target;
let question = Game.getIns().getCurrentPage();
this.playWrongAudio();
......@@ -245,21 +246,24 @@ export default class SceneComponent extends MyCocosSceneComponent {
target.setPosition(0, 0);
}
private isClick;
private touching;
private onTouchStart(e) {
if (!this.isClick) return;
if (!this.isClick || this.touching) return;
this.touching = true;
let target: cc.Node = e.target;
target.parent = this.node;
this.setTouchPos(e);
}
private onTouchMove(e) {
if (!this.isClick) return;
if (!this.isClick || !this.touching) return;
let target: cc.Node = e.target;
this.setTouchPos(e);
}
private onTouchEnd(e) {
if (!this.isClick) return;
if (!this.isClick || !this.touching) return;
this.touching = false;
let target: cc.Node = e.target;
let car = cc.find("spt_car/layout_item", this.layout_game);
if (!car) return;
......
{
"ver": "1.0.8",
"uuid": "2aac122f-0244-4934-8c73-6279a92b7a02",
"uuid": "1da43153-a1ab-4328-9a4b-338745196904",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment