feat: add bingo ball spinning sound effect
- Add `sfx-bingo-balls` audio asset and load it in PreloadScene - Register `BINGO_BALLS` sound in the SFX constants - Play the sound when the bingo ball spinning animation starts
This commit is contained in:
parent
3b113a1092
commit
e1f7534853
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 3.0 MiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 2.8 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 MiB |
|
|
@ -533,6 +533,7 @@ export default class BingoGame extends Phaser.Scene {
|
||||||
this.animating = true;
|
this.animating = true;
|
||||||
this.nextBtn.setEnabled(false);
|
this.nextBtn.setEnabled(false);
|
||||||
this.countText.setText('Spinning…');
|
this.countText.setText('Spinning…');
|
||||||
|
playSound(this, SFX.BINGO_BALLS);
|
||||||
// Spin up to full speed (~2s), hold there for 5s, then draw a ball.
|
// Spin up to full speed (~2s), hold there for 5s, then draw a ball.
|
||||||
this.setSpin(1, 2000, 'Quad.easeIn', () => {
|
this.setSpin(1, 2000, 'Quad.easeIn', () => {
|
||||||
this.spinHoldTimer = this.time.delayedCall(5000, () => {
|
this.spinHoldTimer = this.time.delayedCall(5000, () => {
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ export default class PreloadScene extends Phaser.Scene {
|
||||||
this.load.audio('sfx-casino-win', '/assets/fx/casino-win.mp3');
|
this.load.audio('sfx-casino-win', '/assets/fx/casino-win.mp3');
|
||||||
this.load.audio('sfx-chip-bet', '/assets/fx/chip-bet.mp3');
|
this.load.audio('sfx-chip-bet', '/assets/fx/chip-bet.mp3');
|
||||||
this.load.audio('sfx-dice-roll', '/assets/fx/dice-roll.mp3');
|
this.load.audio('sfx-dice-roll', '/assets/fx/dice-roll.mp3');
|
||||||
|
this.load.audio('sfx-bingo-balls', '/assets/fx/bingo-balls.mp3');
|
||||||
this.load.audio('sfx-pencil-write', '/assets/fx/pencil-write.mp3');
|
this.load.audio('sfx-pencil-write', '/assets/fx/pencil-write.mp3');
|
||||||
this.load.audio('sfx-piece-click', '/assets/fx/piece-click.mp3');
|
this.load.audio('sfx-piece-click', '/assets/fx/piece-click.mp3');
|
||||||
this.load.audio('sfx-roulette', '/assets/fx/roulette.mp3');
|
this.load.audio('sfx-roulette', '/assets/fx/roulette.mp3');
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ export const SFX = {
|
||||||
CHIP_BET: 'sfx-chip-bet',
|
CHIP_BET: 'sfx-chip-bet',
|
||||||
DICE_ROLL: 'sfx-dice-roll',
|
DICE_ROLL: 'sfx-dice-roll',
|
||||||
PENCIL_WRITE: 'sfx-pencil-write',
|
PENCIL_WRITE: 'sfx-pencil-write',
|
||||||
|
BINGO_BALLS: 'sfx-bingo-balls',
|
||||||
PIECE_CLICK: 'sfx-piece-click',
|
PIECE_CLICK: 'sfx-piece-click',
|
||||||
ROULETTE: 'sfx-roulette',
|
ROULETTE: 'sfx-roulette',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue