diff --git a/public/sounds/splash.mp3 b/public/sounds/splash.mp3 new file mode 100644 index 0000000..64d729f Binary files /dev/null and b/public/sounds/splash.mp3 differ diff --git a/src/constants/sounds.ts b/src/constants/sounds.ts index b23429f..2f4384f 100644 --- a/src/constants/sounds.ts +++ b/src/constants/sounds.ts @@ -3,5 +3,6 @@ export enum Sound { Hit = 'Hit', Pop = 'Pop', Shoot = 'Shoot', + Splash = 'Splash', Whoosh = 'Whoosh', } diff --git a/src/gameobjects/enemy.ts b/src/gameobjects/enemy.ts index c4f4dd3..56469b2 100644 --- a/src/gameobjects/enemy.ts +++ b/src/gameobjects/enemy.ts @@ -45,6 +45,10 @@ export function addEnemy() { { bubble: false, damage, speed }, ]) + if (enemy.sprite === Sprite.Gooba) { + play(Sound.Splash) + } + addEnemyState(enemy) enemy.onCollide(Tag.Player, () => { diff --git a/src/scenes/preload.ts b/src/scenes/preload.ts index 249e1db..8e40ae6 100644 --- a/src/scenes/preload.ts +++ b/src/scenes/preload.ts @@ -71,6 +71,7 @@ scene(Scene.Preload, () => { [Sound.Hit, 'sounds/hit.mp3'], [Sound.Pop, 'sounds/pop.mp3'], [Sound.Shoot, 'sounds/shoot.mp3'], + [Sound.Splash, 'sounds/splash.mp3'], [Sound.Whoosh, 'sounds/whoosh.mp3'], ]