diff --git a/src/App.vue b/src/App.vue index 58f084b..ff637ca 100644 --- a/src/App.vue +++ b/src/App.vue @@ -37,4 +37,13 @@ watch( gameStore.game.loadedAssets = [] } ) + +// #209: Play sound when a button is pressed +addEventListener('click', (event) => { + if (event.target !instanceof HTMLButtonElement) { + return + } + const audio = new Audio('/assets/music/click-btn.mp3') + audio.play() +}) </script>