Z for jump

This commit is contained in:
Josh Deprez 2021-08-09 12:03:51 +10:00
parent 1bf7920d2f
commit c43a1edb74

View file

@ -46,7 +46,8 @@ func (aw *Awakeman) Update() error {
aw.coyoteTimer-- aw.coyoteTimer--
} }
} }
if aw.coyoteTimer > 0 && inpututil.IsKeyJustPressed(ebiten.KeySpace) { // NB: spacebar sometimes does things on web pages (scrolls down)
if aw.coyoteTimer > 0 && (inpututil.IsKeyJustPressed(ebiten.KeySpace) || inpututil.IsKeyJustPressed(ebiten.KeyZ)) {
// Jump // Jump
aw.vy = jumpVelocity aw.vy = jumpVelocity
} }