From 1b71e70c58534818c871fe0926e68642ad7ceab1 Mon Sep 17 00:00:00 2001 From: Kyle <41976328+ImKyle4815@users.noreply.github.com> Date: Wed, 30 Oct 2019 20:32:57 -0700 Subject: [PATCH] Update life.js --- data/site/other/life/life.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/site/other/life/life.js b/data/site/other/life/life.js index d575a3cf..d9974ba7 100644 --- a/data/site/other/life/life.js +++ b/data/site/other/life/life.js @@ -289,14 +289,16 @@ function singleTap(targetPlayerBox) { console.log("Rotation: " + tappedPlayerBox.rotation) console.log("touchX: " + touchX[touchX.length - 1] + "\ntouchY: " + touchY[touchY.length - 1]) if (tappedPlayerBox.rotation == 0 || tappedPlayerBox.rotation == 180) { - console.log("rotation was 0 or 180, right?") + console.log(touchX[touchX.length - 1]) + console.log(playerBoxBounds.width / 2 + playerBoxBounds.x) if (touchX[touchX.length - 1] > playerBoxBounds.width / 2 + playerBoxBounds.x) { lifeAdjust = 1 } else { lifeAdjust = -1 } } else { - console.log("rotation was 90 or 270, right?") + console.log(touchY[touchY.length - 1]) + console.log(playerBoxBounds.height / 2 + playerBoxBounds.y) if (touchY[touchY.length - 1] > playerBoxBounds.height / 2 + playerBoxBounds.y) { lifeAdjust = 1 } else {