mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 21:31:39 -05:00
life
This commit is contained in:
@@ -145,6 +145,7 @@ function playerBox(playerBoxID, canvasRotation, wide) {
|
|||||||
document.getElementById("mainGrid").appendChild(this.canvas)
|
document.getElementById("mainGrid").appendChild(this.canvas)
|
||||||
this.canvas.addEventListener("mousedown", function() {
|
this.canvas.addEventListener("mousedown", function() {
|
||||||
mouseDownPlayerBox(this, event.clientX, event.clientY)
|
mouseDownPlayerBox(this, event.clientX, event.clientY)
|
||||||
|
alert("It's still clicking!")
|
||||||
})
|
})
|
||||||
document.addEventListener("mouseup", function() {
|
document.addEventListener("mouseup", function() {
|
||||||
mouseUpPlayerBox(this)
|
mouseUpPlayerBox(this)
|
||||||
@@ -222,16 +223,8 @@ function updateBackgroundColor(color) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Wake lock!
|
|
||||||
var noSleep = new NoSleep();
|
|
||||||
function enableNoSleep() {
|
|
||||||
noSleep.enable();
|
|
||||||
document.removeEventListener('touchstart', enableNoSleep, false);
|
|
||||||
}
|
|
||||||
document.addEventListener('touchstart', enableNoSleep, false);
|
|
||||||
|
|
||||||
|
|
||||||
function switchToTouchEvents() {
|
function switchToTouchEvents() {
|
||||||
|
alert("switching to touch events!")
|
||||||
document.removeEventListener("mousedown")
|
document.removeEventListener("mousedown")
|
||||||
document.removeEventListener("mouseup")
|
document.removeEventListener("mouseup")
|
||||||
document.addEventListener("touchstart", function() {
|
document.addEventListener("touchstart", function() {
|
||||||
|
@@ -48,12 +48,10 @@
|
|||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<script src="https://github.com/richtr/NoSleep.js/blob/master/dist/NoSleep.min.js"></script>
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="settings" class="settings">
|
<div id="settings" class="settings">
|
||||||
Number of Players:<br>
|
Number of Players:<br>
|
||||||
<input id="inputPlayerCount" class="input" type="number" min="2" value="6" max="16"><br>
|
<input id="inputPlayerCount" class="input" type="number" min="2" value="4" max="16"><br>
|
||||||
Starting Life Total:<br>
|
Starting Life Total:<br>
|
||||||
<input id="inputStartingLife" class="input" type="number" min="0" value="40"><br>
|
<input id="inputStartingLife" class="input" type="number" min="0" value="40"><br>
|
||||||
<button id="buttonStartGame" class="input" onclick="startGame()">Game On!</button>
|
<button id="buttonStartGame" class="input" onclick="startGame()">Game On!</button>
|
||||||
|
Reference in New Issue
Block a user