This commit is contained in:
Killian Marty 2023-12-09 15:03:48 +01:00
parent b7e546c67f
commit 565f6d4c19
2 changed files with 2 additions and 4 deletions

View file

@ -1,4 +1,4 @@
let dt = 1.;
let dt = 0;
let currentTime = new Date();
function game() {
if(player==null)

View file

@ -32,9 +32,7 @@ class Input {
});
window.addEventListener("keydown", (e)=>{
if(["Space","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].indexOf(e.code) > -1) {
e.preventDefault();
}
e.preventDefault(); //blocks the action of the key (cf. Killian)
this.keysDown.add(e.key.toLowerCase())
this.updateDir();
})