diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 623d73a..0000000 --- a/.editorconfig +++ /dev/null @@ -1,7 +0,0 @@ -root = true -[*] -end_of_line = lf -insert_final_newline = true -[*.go] -indent_style = tab -indent_size = 4 diff --git a/engine/audio/manager.go b/engine/audio/manager.go index 36fdd71..11041f7 100644 --- a/engine/audio/manager.go +++ b/engine/audio/manager.go @@ -55,9 +55,7 @@ func (sm *Manager) Stop(id SoundID) { } func (sm Manager) IsPlaying(id SoundID) bool { - return slices.ContainsFunc(sm.active, func(e audio) bool { - return e.id == id - }) + return rl.IsSoundPlaying(*sm.library.Get(id)) } // Pause all active sounds diff --git a/game/state/handlers/gameover.go b/game/state/handlers/gameover.go index 9c557ee..9b35471 100644 --- a/game/state/handlers/gameover.go +++ b/game/state/handlers/gameover.go @@ -19,12 +19,10 @@ func (GameOver) Exit() { } func (GameOver GameOver) Update(fsm state.Transitioner, delta float32) { - if !audio.IsPlaying(assets.SFX_GAME_OVER) { - if rl.IsKeyPressed(rl.KeyEnter) { - fsm.Switch("gameplay") - } else if rl.IsKeyPressed(rl.KeyQ) { - fsm.Switch("menu") - } + if rl.IsKeyPressed(rl.KeyEnter) { + fsm.Switch("gameplay") + } else if rl.IsKeyPressed(rl.KeyQ) { + fsm.Switch("menu") } }