Update life.js

This commit is contained in:
Kyle
2019-08-11 19:49:43 -07:00
parent 9738f16848
commit 566e3e5d95

View File

@@ -243,10 +243,10 @@ function switchToTouchEvents() {
for (var i = 1; i <= playerCount; i++) {
playerList[i - 1].canvas.removeEventListener("mousedown", decoyMouseDownFunction, true)
playerList[i - 1].canvas.addEventListener("touchstart", function() {
window.scrollTo(0, 0)
for (var i = 0; i < event.touches.length; i ++) {
mouseDownPlayerBox(this, event.touches[i].clientX, event.touches[i].clientY)
}
window.scrollTo(0, 0)
}, true)
playerList[i - 1].canvas.addEventListener("touchend", function() {
mouseUpPlayerBox(this)