mirror of
https://gitlab.com/skysthelimit.dev/selenite.git
synced 2025-06-16 10:32:08 -05:00
improved 60s burger run mod menu
This commit is contained in:
parent
ecb9411636
commit
0a4872cd40
@ -41,6 +41,7 @@
|
|||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
if(document.getElementsByTagName("canvas").length) {
|
if(document.getElementsByTagName("canvas").length) {
|
||||||
document.getElementsByTagName("canvas")[0].classList.add("no-select")
|
document.getElementsByTagName("canvas")[0].classList.add("no-select")
|
||||||
|
document.getElementsByTagName("canvas")[0].fillText("Hello World", canvas.width/2, canvas.height/2);
|
||||||
}
|
}
|
||||||
}, 2000);
|
}, 2000);
|
||||||
</script>
|
</script>
|
||||||
@ -84,6 +85,9 @@
|
|||||||
<body>
|
<body>
|
||||||
<script> // my custom code
|
<script> // my custom code
|
||||||
let infjump;
|
let infjump;
|
||||||
|
let label;
|
||||||
|
let thetime;
|
||||||
|
let timer;
|
||||||
document.onkeydown = keydown;
|
document.onkeydown = keydown;
|
||||||
|
|
||||||
function keydown (evt) {
|
function keydown (evt) {
|
||||||
@ -127,6 +131,9 @@
|
|||||||
} else {
|
} else {
|
||||||
alert("idk what u want");
|
alert("idk what u want");
|
||||||
}
|
}
|
||||||
|
} else if (evt.key === 't') {
|
||||||
|
setInterval(createText, 70);
|
||||||
|
timer = 1;
|
||||||
}
|
}
|
||||||
document.addEventListener('keydown', event => {
|
document.addEventListener('keydown', event => {
|
||||||
if (event.code === 'Space' && infjump == 1) {
|
if (event.code === 'Space' && infjump == 1) {
|
||||||
@ -134,6 +141,32 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function createText() {
|
||||||
|
thetime = tim;
|
||||||
|
thetime = Math.round(thetime / 0.12) / 50;
|
||||||
|
if (!label == "") {
|
||||||
|
label.destroy();
|
||||||
|
}
|
||||||
|
label = this.game.add.text(
|
||||||
|
screenX,
|
||||||
|
screenY,
|
||||||
|
'Time: ' + thetime,
|
||||||
|
{ font: '15px Arial',
|
||||||
|
fill: '#ffffff',
|
||||||
|
}
|
||||||
|
);
|
||||||
|
label.fixedToCamera = true; // so it will move with camera
|
||||||
|
label.anchor.setTo(0.4, 0);
|
||||||
|
}
|
||||||
|
setInterval(() => {
|
||||||
|
if (sprt.gameDone === true) {
|
||||||
|
alert("Your final time was " + thetime + " seconds.");
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script src="js/main.js"></script>
|
<script src="js/main.js"></script>
|
||||||
<script>function fnSendMsg(evt){
|
<script>function fnSendMsg(evt){
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user