From c59f6f77bd55e56a9eeb1b2fe956bc5fe9d44133 Mon Sep 17 00:00:00 2001 From: Kyle <41976328+ImKyle4815@users.noreply.github.com> Date: Wed, 30 Oct 2019 20:36:43 -0700 Subject: [PATCH] Update life.js --- data/site/other/life/life.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/site/other/life/life.js b/data/site/other/life/life.js index d9974ba7..ead283ee 100644 --- a/data/site/other/life/life.js +++ b/data/site/other/life/life.js @@ -291,7 +291,7 @@ function singleTap(targetPlayerBox) { if (tappedPlayerBox.rotation == 0 || tappedPlayerBox.rotation == 180) { console.log(touchX[touchX.length - 1]) console.log(playerBoxBounds.width / 2 + playerBoxBounds.x) - if (touchX[touchX.length - 1] > playerBoxBounds.width / 2 + playerBoxBounds.x) { + if (touchX[touchX.length - 1] > playerBoxBounds.width / 2 + playerBoxBounds.left) { lifeAdjust = 1 } else { lifeAdjust = -1 @@ -299,7 +299,7 @@ function singleTap(targetPlayerBox) { } else { console.log(touchY[touchY.length - 1]) console.log(playerBoxBounds.height / 2 + playerBoxBounds.y) - if (touchY[touchY.length - 1] > playerBoxBounds.height / 2 + playerBoxBounds.y) { + if (touchY[touchY.length - 1] > playerBoxBounds.height / 2 + playerBoxBounds.top) { lifeAdjust = 1 } else { lifeAdjust = -1