From 08d849a4f224c992bdd5599f4bfc0342db843f13 Mon Sep 17 00:00:00 2001 From: Kyle <41976328+ImKyle4815@users.noreply.github.com> Date: Sat, 10 Aug 2019 16:33:22 -0700 Subject: [PATCH] Update life.js --- data/life/life.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/life/life.js b/data/life/life.js index 30b452b0..030caafe 100644 --- a/data/life/life.js +++ b/data/life/life.js @@ -225,8 +225,10 @@ function updateBackgroundColor(color) { function switchToTouchEvents() { window.removeEventListener("touchstart", switchToTouchEvents) + document.removeEventListener("mouseup", decoyMouseUpFunction) + alert("switch!!!!") for (var i = 1; i <= playerCount; i++) { - playerList[i - 1].canvas.removeEventListener("mousedown", decoyMouseDownFunction) + alert(playerList[i - 1].canvas.removeEventListener("mousedown", decoyMouseDownFunction)) playerList[i - 1].canvas.addEventListener("touchstart", function() { mouseDownPlayerBox(this, event.clientX, event.clientY) })