diff --git a/assets/sound.go b/assets/sound.go index 9bc2365..bd12a39 100644 --- a/assets/sound.go +++ b/assets/sound.go @@ -7,6 +7,7 @@ import ( const ( SFX_SHAPE_LOCKED audio.SoundID = 0 SFX_ROW_CLEARED audio.SoundID = 1 + SFX_MUSIC audio.SoundID = 3 SFX_MENU_SELECT audio.SoundID = 0 SFX_MENU_ENTER audio.SoundID = 1 SFX_MENU_SOUND_VOLUME_SELECT audio.SoundID = 1 diff --git a/game/state/handlers/gameplay.go b/game/state/handlers/gameplay.go index 48a64f8..b65da11 100644 --- a/game/state/handlers/gameplay.go +++ b/game/state/handlers/gameplay.go @@ -54,9 +54,12 @@ func (gp *GamePlay) Enter() { gp.nextShape = gp.shapeQueue.Next() gp.SpawnShape() gp.lineClearAnimation.Reset() + + audio.PlayLooped(assets.SFX_MUSIC) } func (GamePlay) Exit() { + audio.Stop(assets.SFX_MUSIC) } func (gp *GamePlay) SpawnShape() {