diff --git a/src/assets/assets.ts b/src/assets/assets.ts index 700e719..b8efbd7 100644 --- a/src/assets/assets.ts +++ b/src/assets/assets.ts @@ -188,6 +188,21 @@ const audios: Audio[] = [ sound('pickupcustomer', 'pickup', 0.5), sound('dropcustomer', 'drop', 0.5), sound('tree/meme_explosion_sound', 'meme_explosion_sound', 0.5), + + sound("turtle/air", "air", 0.5), + sound("turtle/flail", "flail", 0.5), + sound("turtle/grab", "grab", 0.5), + sound("turtle/land", "land", 0.5), + sound("turtle/letgo1", "letgo1", 0.5), + sound("turtle/letgo2", "letgo2", 0.5), + sound("turtle/letgo3", "letgo3", 0.5), + sound("turtle/miss", "miss", 0.5), + sound("turtle/missLand", "missLand", 0.5), + sound("turtle/score", "score", 0.5), + sound("turtle/slip", "slip", 0.5), + sound("turtle/toss", "toss", 0.5), + sound("turtle/trick", "trick", 0.5), + sound("turtle/trip", "trip", 0.5), ]; /* Fonts */ diff --git a/src/assets/sounds/turtle/air.mp3 b/src/assets/sounds/turtle/air.mp3 new file mode 100644 index 0000000..0dddd4b Binary files /dev/null and b/src/assets/sounds/turtle/air.mp3 differ diff --git a/src/assets/sounds/turtle/flail.mp3 b/src/assets/sounds/turtle/flail.mp3 new file mode 100644 index 0000000..29c2008 Binary files /dev/null and b/src/assets/sounds/turtle/flail.mp3 differ diff --git a/src/assets/sounds/turtle/grab.mp3 b/src/assets/sounds/turtle/grab.mp3 new file mode 100644 index 0000000..628d7d2 Binary files /dev/null and b/src/assets/sounds/turtle/grab.mp3 differ diff --git a/src/assets/sounds/turtle/land.mp3 b/src/assets/sounds/turtle/land.mp3 new file mode 100644 index 0000000..6787fc1 Binary files /dev/null and b/src/assets/sounds/turtle/land.mp3 differ diff --git a/src/assets/sounds/turtle/letgo1.mp3 b/src/assets/sounds/turtle/letgo1.mp3 new file mode 100644 index 0000000..c90a0ac Binary files /dev/null and b/src/assets/sounds/turtle/letgo1.mp3 differ diff --git a/src/assets/sounds/turtle/letgo2.mp3 b/src/assets/sounds/turtle/letgo2.mp3 new file mode 100644 index 0000000..596ec35 Binary files /dev/null and b/src/assets/sounds/turtle/letgo2.mp3 differ diff --git a/src/assets/sounds/turtle/letgo3.mp3 b/src/assets/sounds/turtle/letgo3.mp3 new file mode 100644 index 0000000..c86546c Binary files /dev/null and b/src/assets/sounds/turtle/letgo3.mp3 differ diff --git a/src/assets/sounds/turtle/miss.mp3 b/src/assets/sounds/turtle/miss.mp3 new file mode 100644 index 0000000..421f4b2 Binary files /dev/null and b/src/assets/sounds/turtle/miss.mp3 differ diff --git a/src/assets/sounds/turtle/missLand.mp3 b/src/assets/sounds/turtle/missLand.mp3 new file mode 100644 index 0000000..9f5934c Binary files /dev/null and b/src/assets/sounds/turtle/missLand.mp3 differ diff --git a/src/assets/sounds/turtle/score.mp3 b/src/assets/sounds/turtle/score.mp3 new file mode 100644 index 0000000..cc94e51 Binary files /dev/null and b/src/assets/sounds/turtle/score.mp3 differ diff --git a/src/assets/sounds/turtle/slip.mp3 b/src/assets/sounds/turtle/slip.mp3 new file mode 100644 index 0000000..3625b56 Binary files /dev/null and b/src/assets/sounds/turtle/slip.mp3 differ diff --git a/src/assets/sounds/turtle/toss.mp3 b/src/assets/sounds/turtle/toss.mp3 new file mode 100644 index 0000000..4416006 Binary files /dev/null and b/src/assets/sounds/turtle/toss.mp3 differ diff --git a/src/assets/sounds/turtle/trick.mp3 b/src/assets/sounds/turtle/trick.mp3 new file mode 100644 index 0000000..f88aa01 Binary files /dev/null and b/src/assets/sounds/turtle/trick.mp3 differ diff --git a/src/assets/sounds/turtle/trip.mp3 b/src/assets/sounds/turtle/trip.mp3 new file mode 100644 index 0000000..9f5d789 Binary files /dev/null and b/src/assets/sounds/turtle/trip.mp3 differ diff --git a/src/components/Customer.ts b/src/components/Customer.ts index af64ae3..dc52ec7 100644 --- a/src/components/Customer.ts +++ b/src/components/Customer.ts @@ -215,7 +215,7 @@ export class Customer extends Button { if (this.patience <= 0) { if (this.hasCompleted) { if (Math.random() > 0.2) { - this.scene.sound.play("cashmoney"); + this.scene.sound.play("cashmoney", { volume: 0.4 }); this.scene.addEffect( new TextEffect( this.scene, @@ -234,10 +234,10 @@ export class Customer extends Button { ); this.emit("pay", this.moneySpent); } else { - this.scene.sound.play("rip"); + this.scene.sound.play("rip", { volume: 0.4 }); } } else { - this.scene.sound.play("rip"); + this.scene.sound.play("rip", { volume: 0.4 }); } this.leave(); this.thoughtBubble.showSymbol("sad"); @@ -268,7 +268,7 @@ export class Customer extends Button { } } if (this.playFail) { - this.scene.sound.play("rip"); + this.scene.sound.play("rip", { volume: 0.4 }); this.playFail = false; } } @@ -292,6 +292,7 @@ export class Customer extends Button { this.emit("pickup"); this.dragged = true; this.sprite.setTexture(this.spriteKeys.sit); + this.scene.sound.play("grab", { volume: 0.5 }); } onDrag(pointer: Phaser.Input.Pointer, dragX: number, dragY: number) { @@ -305,6 +306,7 @@ export class Customer extends Button { this.dragged = false; this.emit("drop"); this.sprite.setTexture(this.spriteKeys.sit); + this.scene.sound.play("letgo1", { volume: 0.4 }); } resetPatience() { @@ -443,7 +445,7 @@ export class Customer extends Button { } else { this.actionsComplete = true; this.parseMoney(); - this.scene.sound.play("cashmoney"); + this.scene.sound.play("cashmoney", { volume: 0.4 }); this.scene.addEffect( new TextEffect( this.scene, @@ -656,16 +658,16 @@ export class Customer extends Button { this.parseHappiness(); } - pauseClickable(){ - if(!(this.sprite.input!.enabled)) { + pauseClickable() { + if (!this.sprite.input!.enabled) { this.garchomp = true; } else { this.sprite.input!.enabled = false; } } - resumeClickable(){ - if(this.garchomp) { + resumeClickable() { + if (this.garchomp) { this.garchomp = false; } else { this.sprite.input!.enabled = true; diff --git a/src/components/UpgradeOverlay.ts b/src/components/UpgradeOverlay.ts index dafbea2..da248fa 100644 --- a/src/components/UpgradeOverlay.ts +++ b/src/components/UpgradeOverlay.ts @@ -69,8 +69,10 @@ export class UpgradeOverlay extends Phaser.GameObjects.Container { this.buyButton.on("click", () => { if (this.selectedStation) { this.emit("upgradeStation", this.selectedStation); + this.scene.sound.play("score", { volume: 1.0 }); } else { this.emit("upgradeEmployee", this.selectedEmployee); + this.scene.sound.play("score", { volume: 1.0 }); } }); @@ -195,6 +197,7 @@ export class UpgradeOverlay extends Phaser.GameObjects.Container { alpha: 1, duration: 200, }); + this.scene.sound.play("flail", { volume: 0.3 }); } } @@ -210,5 +213,6 @@ export class UpgradeOverlay extends Phaser.GameObjects.Container { this.emit("close"); }, }); + this.scene.sound.play("missLand", { volume: 0.2 }); } } diff --git a/src/scenes/GameScene.ts b/src/scenes/GameScene.ts index 33b5094..a643495 100644 --- a/src/scenes/GameScene.ts +++ b/src/scenes/GameScene.ts @@ -687,7 +687,6 @@ export class GameScene extends BaseScene { // Picking up a customer customer.on("pickup", () => { - this.sound.play("pickup"); if (customer.currentStation) { // customer.currentStation.setCustomer(null); // customer.setStation(null); @@ -704,7 +703,6 @@ export class GameScene extends BaseScene { // Dropping a customer customer.on("drop", () => { - this.sound.play("drop"); let station = this.getClosestStation(customer); if (station) { // Let go of previous station