mirror of
https://github.com/He4eT/DotDashPit.git
synced 2026-05-04 17:37:23 +00:00
game: handle input after drawing
This commit is contained in:
parent
d9d8d4b0f0
commit
0e2596d1de
1 changed files with 4 additions and 5 deletions
9
game.js
9
game.js
|
|
@ -149,9 +149,6 @@ function gameover() {
|
|||
function gameScreen() {
|
||||
checkColisions()
|
||||
|
||||
handleMoves()
|
||||
// handleMorse()
|
||||
|
||||
spawnEnemies()
|
||||
moveEnemies()
|
||||
|
||||
|
|
@ -161,6 +158,8 @@ function gameScreen() {
|
|||
drawEnemies()
|
||||
drawPlayer()
|
||||
drawLetters()
|
||||
|
||||
handleMoves()
|
||||
handleMorse()
|
||||
}
|
||||
|
||||
|
|
@ -247,8 +246,8 @@ function handleMorse() {
|
|||
|
||||
// Hold
|
||||
if (buttonPressed && key.isDown) {
|
||||
const dash = now - key.downAt > DOT_DASH_THRESHOLD
|
||||
player.state = dash ? 'dash' : 'dot'
|
||||
const isDash = now - key.downAt > DOT_DASH_THRESHOLD
|
||||
player.state = isDash ? 'dash' : 'dot'
|
||||
playMorseKey(arena.waveSeed)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue