mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 21:31:39 -05:00
Update life.js
This commit is contained in:
@@ -335,11 +335,7 @@ function switchToTouchEvents() {
|
|||||||
window.addEventListener("touchend", endTouch, true)
|
window.addEventListener("touchend", endTouch, true)
|
||||||
}
|
}
|
||||||
function startTouch() {
|
function startTouch() {
|
||||||
// touchX = [], touchY = []
|
alert("start touch")
|
||||||
// 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 (event.touches.length > 0) {
|
||||||
if (!clicking) {
|
if (!clicking) {
|
||||||
updatePlayerBoxes()
|
updatePlayerBoxes()
|
||||||
@@ -348,6 +344,7 @@ function startTouch() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function moveTouch() {
|
function moveTouch() {
|
||||||
|
alert("move touch")
|
||||||
touchX = [], touchY = []
|
touchX = [], touchY = []
|
||||||
for (var i = 0; i < event.touches.length; i ++) {
|
for (var i = 0; i < event.touches.length; i ++) {
|
||||||
touchX[i] = event.touches[i].clientX
|
touchX[i] = event.touches[i].clientX
|
||||||
@@ -355,11 +352,7 @@ function moveTouch() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function endTouch() {
|
function endTouch() {
|
||||||
// touchX = [], touchY = []
|
alert("end touch")
|
||||||
// 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) {
|
if (event.touches.length < 1) {
|
||||||
clicking = false
|
clicking = false
|
||||||
clearTimeout(loop)
|
clearTimeout(loop)
|
||||||
|
Reference in New Issue
Block a user