Compare commits
No commits in common. "53ac3840baf207b5c983535a3fbf69a11f4b7a52" and "57e57f3037ac026ec24c264617f648a234c59862" have entirely different histories.
53ac3840ba
...
57e57f3037
3 changed files with 5 additions and 16 deletions
|
|
@ -1,7 +0,0 @@
|
|||
root = true
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
[*.go]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue