|
@@ -28,7 +28,9 @@ export class touch extends Component {
|
|
|
},this)
|
|
|
|
|
|
this.node.on(Node.EventType.TOUCH_MOVE,(et:EventTouch)=>{
|
|
|
-
|
|
|
+ if(this.CurTouchId!=et.getID()){
|
|
|
+ return
|
|
|
+ }
|
|
|
if(this.start_node!=null){
|
|
|
// let n = this.getClickPos(et.getUILocation().x)
|
|
|
// if(n!=null&&n!=this.start_node){
|
|
@@ -102,9 +104,12 @@ export class touch extends Component {
|
|
|
}
|
|
|
|
|
|
_touchEndEvent(et:EventTouch){
|
|
|
- this.CurTouchId = -1;
|
|
|
- this.mDir = DirType.NONE
|
|
|
- this.mCar.setDir(this.mDir)
|
|
|
+ if(this.CurTouchId==et.getID()){
|
|
|
+ this.CurTouchId = -1;
|
|
|
+ this.mDir = DirType.NONE
|
|
|
+ this.mCar.setDir(this.mDir)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
update(deltaTime: number) {
|
|
|
|