Update life.js

This commit is contained in:
Kyle
2019-08-16 14:03:09 -07:00
parent 0de9385a69
commit fcc6185cd5

View File

@@ -372,6 +372,7 @@ function endTouch() {
function singleTap() { function singleTap() {
console.log("a tap has occurred!")
var playerBoxBounds = event.target.getBoundingClientRect() var playerBoxBounds = event.target.getBoundingClientRect()
var tappedPlayerBox = playerList[event.target.customVarID - 1] var tappedPlayerBox = playerList[event.target.customVarID - 1]
var lifeAdjust = 0 var lifeAdjust = 0
@@ -394,6 +395,7 @@ function singleTap() {
direction = lifeAdjust + "" direction = lifeAdjust + ""
tappedPlayerBox.life += lifeAdjust tappedPlayerBox.life += lifeAdjust
drawPlayerBox(tappedPlayerBox.id) drawPlayerBox(tappedPlayerBox.id)
console.log(tappedPlayerBox.id)
} }
@@ -548,4 +550,4 @@ function heldDown() {
loop = setTimeout(heldDown, 100) loop = setTimeout(heldDown, 100)
} }
} }
//Updated for real //Updated for real