mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 13:21:41 -05:00
Update life.js
This commit is contained in:
@@ -332,11 +332,11 @@ function switchToTouchEvents() {
|
||||
window.addEventListener("touchend", endTouch, true)
|
||||
}
|
||||
function startTouch() {
|
||||
touchX = [], touchY = []
|
||||
for (var i = 0; i < event.touches.length; i ++) {
|
||||
touchX[i] = event.touches[i].clientX
|
||||
touchY[i] = event.touches[i].clientY
|
||||
}
|
||||
// touchX = [], touchY = []
|
||||
// for (var i = 0; i < event.touches.length; i ++) {
|
||||
// touchX[i] = event.touches[i].clientX
|
||||
// touchY[i] = event.touches[i].clientY
|
||||
// }
|
||||
if (event.touches.length > 0) {
|
||||
if (!clicking) {
|
||||
updatePlayerBoxes()
|
||||
@@ -352,11 +352,11 @@ function moveTouch() {
|
||||
}
|
||||
}
|
||||
function endTouch() {
|
||||
touchX = [], touchY = []
|
||||
for (var i = 0; i < event.touches.length; i ++) {
|
||||
touchX[i] = event.touches[i].clientX
|
||||
touchY[i] = event.touches[i].clientY
|
||||
}
|
||||
// touchX = [], touchY = []
|
||||
// for (var i = 0; i < event.touches.length; i ++) {
|
||||
// touchX[i] = event.touches[i].clientX
|
||||
// touchY[i] = event.touches[i].clientY
|
||||
// }
|
||||
if (event.touches.length < 1) {
|
||||
clicking = false
|
||||
clearTimeout(loop)
|
||||
|
Reference in New Issue
Block a user