touch event fire properly for start

beta.r3js.org
-=yb4f310 2017-09-29 06:26:40 +02:00
parent da84dc459f
commit 013852d456
1 changed files with 5 additions and 3 deletions

View File

@ -225,11 +225,12 @@ GameLib.System.Input.prototype.onTouchStart = function(event) {
pageX : event.touches[t].pageX,
pageY : event.touches[t].pageY,
cancelled : false,
ended : false,
event : event
ended : false
};
}
this.touches.event = event;
GameLib.Event.Emit(
GameLib.Event.TOUCH_START,
this.touches
@ -269,9 +270,10 @@ GameLib.System.Input.prototype.onTouchMove = function(event) {
this.touches[id].down += down;
this.touches[id].pageX = event.changedTouches[t].pageX;
this.touches[id].pageY = event.changedTouches[t].pageY;
this.touches.event = event;
}
this.touches.event = event;
GameLib.Event.Emit(
GameLib.Event.TOUCH_MOVE,
this.touches