started implementing score system

This commit is contained in:
2024-02-28 13:15:45 +01:00
parent 707281212a
commit ebaeb51f68
6 changed files with 58 additions and 24 deletions

View File

@@ -151,16 +151,16 @@ func (system *PlayerSystem) CheckMovement(
if !velocity.Moving() {
switch {
case ebiten.IsKeyPressed(ebiten.KeyRight):
case inpututil.IsKeyJustPressed(ebiten.KeyRight):
velocity.Change(East)
moved = true
case ebiten.IsKeyPressed(ebiten.KeyLeft):
case inpututil.IsKeyJustPressed(ebiten.KeyLeft):
velocity.Change(West)
moved = true
case ebiten.IsKeyPressed(ebiten.KeyDown):
case inpututil.IsKeyJustPressed(ebiten.KeyDown):
velocity.Change(South)
moved = true
case ebiten.IsKeyPressed(ebiten.KeyUp):
case inpututil.IsKeyJustPressed(ebiten.KeyUp):
velocity.Change(North)
moved = true
}