pnj
This commit is contained in:
parent
b7e546c67f
commit
565f6d4c19
2 changed files with 2 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
let dt = 1.;
|
||||
let dt = 0;
|
||||
let currentTime = new Date();
|
||||
function game() {
|
||||
if(player==null)
|
||||
|
|
|
@ -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();
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue