From 78b29c7306bc0bfde2c124d0c81e95635bc208a6 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sat, 18 Nov 2017 14:18:25 +0100 Subject: [PATCH] fix movement touch --- src/game-lib-system-input.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game-lib-system-input.js b/src/game-lib-system-input.js index 2389b0d..073ae38 100644 --- a/src/game-lib-system-input.js +++ b/src/game-lib-system-input.js @@ -641,10 +641,10 @@ GameLib.System.Input.prototype.onTouchMove = function (event) { down += diffY; } - this.touches[id].right += right; - this.touches[id].left += left; - this.touches[id].up += up; - this.touches[id].down += down; + this.touches[id].right = right; + this.touches[id].left = left; + this.touches[id].up = up; + this.touches[id].down = down; this.touches[id].lastTouchX = event.changedTouches[id].pageX; this.touches[id].lastTouchY = event.changedTouches[id].pageY; this.touches[id].pageX = event.changedTouches[t].pageX;