touch meta more info
parent
bbd475a2e6
commit
c064185fd4
|
@ -666,6 +666,11 @@ GameLib.System.Input.prototype.onTouchMove = function (event) {
|
|||
var pinch = false;
|
||||
var zoom = false;
|
||||
|
||||
var totalUp = 0;
|
||||
var totalDown = 0;
|
||||
var totalLeft = 0;
|
||||
var totalRight = 0;
|
||||
|
||||
for (var t = 0; t < event.changedTouches.length; t++) {
|
||||
|
||||
id = event.changedTouches[t].identifier;
|
||||
|
@ -704,6 +709,11 @@ GameLib.System.Input.prototype.onTouchMove = function (event) {
|
|||
this.touches[id].lastTouchY = event.changedTouches[t].pageY;
|
||||
this.touches[id].pageX = event.changedTouches[t].pageX;
|
||||
this.touches[id].pageY = event.changedTouches[t].pageY;
|
||||
|
||||
totalLeft += left;
|
||||
totalRight += right;
|
||||
totalUp += up;
|
||||
totalDown += down;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -747,7 +757,11 @@ GameLib.System.Input.prototype.onTouchMove = function (event) {
|
|||
inward : inward,
|
||||
outward : outward,
|
||||
pinch : pinch,
|
||||
zoom : zoom
|
||||
zoom : zoom,
|
||||
totalLeft : totalLeft,
|
||||
totalRight : totalRight,
|
||||
totalUp : totalUp,
|
||||
totalDown : totalDown
|
||||
};
|
||||
|
||||
// if (this.sensitivityCounter >= this.touchSensitivity) {
|
||||
|
@ -757,6 +771,7 @@ GameLib.System.Input.prototype.onTouchMove = function (event) {
|
|||
GameLib.Event.Emit(
|
||||
GameLib.Event.TOUCH_MOVE,
|
||||
this.touches
|
||||
|
||||
);
|
||||
|
||||
// }
|
||||
|
|
Loading…
Reference in New Issue