diff --git a/components/GameBoard.vue b/components/GameBoard.vue index 5638a76..c5aea63 100644 --- a/components/GameBoard.vue +++ b/components/GameBoard.vue @@ -29,6 +29,15 @@ watch( } }) +watch( + () => goStore.current_game?.players, + (newList, oldList) => { + if (!oldList || !newList) { return } + if (newList?.length > oldList.length) { + playSound('/sounds/teleport.mp3') + } + + }) function showLoserScreen() { // playSound('/sounds/ding.mp3') } diff --git a/public/sounds/teleport.mp3 b/public/sounds/teleport.mp3 new file mode 100644 index 0000000..b793faa --- /dev/null +++ b/public/sounds/teleport.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17446b55fcf113bb1250c33ee6173644a80577f0ba523f1e3ca19ae1dcca3d65 +size 47088