Updated Audio for Bear and Wizard. Audio remix. Adding menu assets
This commit is contained in:
parent
ed5e96d053
commit
105b730ea7
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 1.7 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 873 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -16,7 +16,7 @@ export class GameScene extends Phaser.Scene {
|
|||
// Stats
|
||||
this.numberOfJewels = 4;
|
||||
this.startRows = 2;
|
||||
this.level = 12;
|
||||
this.level = 1;
|
||||
this.matchesNeeded = 8;
|
||||
this.score = 0;
|
||||
this.ally = 'goblin';
|
||||
|
|
@ -111,7 +111,7 @@ export class GameScene extends Phaser.Scene {
|
|||
this.createStart();
|
||||
|
||||
// Background Music
|
||||
this.bgMusic = this.sound.add(`${this.ally}-music`, { volume: 0.2 });
|
||||
this.bgMusic = this.sound.add(`${this.ally}-music`, { volume: 0.25 });
|
||||
this.bgMusic.loop = true;
|
||||
this.bgMusic.play();
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ export class GameScene extends Phaser.Scene {
|
|||
this.gameStatus === true
|
||||
) {
|
||||
this.moveAllJewelsUp();
|
||||
this.moveTimer = 0; // Reset the timer
|
||||
this.moveTimer = 0;
|
||||
}
|
||||
|
||||
if (this.moveInterval - this.moveTimer <= 3000) {
|
||||
|
|
@ -213,7 +213,7 @@ export class GameScene extends Phaser.Scene {
|
|||
}
|
||||
|
||||
this.countdownTimer = true;
|
||||
this.sound.play('countdown');
|
||||
this.sound.play('countdown', { volume: .3 });
|
||||
this.time.delayedCall(6000, () => {
|
||||
this.countdownTimer = false;
|
||||
});
|
||||
|
|
@ -351,7 +351,7 @@ export class GameScene extends Phaser.Scene {
|
|||
}
|
||||
// Set swapping flag to prevent new clicks from being processed
|
||||
this.isSwapping = true;
|
||||
this.sound.play('switch');
|
||||
this.sound.play('switch', { volume: .6 });
|
||||
|
||||
// Disable all jewel interactivity temporarily
|
||||
this.jewels.children.iterate((jewel) => {
|
||||
|
|
@ -382,7 +382,7 @@ export class GameScene extends Phaser.Scene {
|
|||
|
||||
|
||||
// After swap completes, re-enable interactivity and reset flag
|
||||
this.time.delayedCall(300, () => { // Adjust delay as needed for animation duration
|
||||
this.time.delayedCall(400, () => { // Adjust delay as needed for animation duration
|
||||
this.jewels.children.iterate((jewel) => {
|
||||
if (jewel) {
|
||||
jewel.setInteractive();
|
||||
|
|
@ -559,6 +559,7 @@ export class GameScene extends Phaser.Scene {
|
|||
checkMatches() {
|
||||
this.checkWarning();
|
||||
const matchedJewels = new Set();
|
||||
const matchesNeeded = this.matchesNeeded;
|
||||
|
||||
// Check horizontal matches
|
||||
for (let row = 1; row <= this.gridConfig.rows; row++) {
|
||||
|
|
@ -631,7 +632,7 @@ export class GameScene extends Phaser.Scene {
|
|||
// If we found matches, destroy them and play video
|
||||
if (matchedJewels.size > 0) {
|
||||
this.playVideo(matchedJewels.size);
|
||||
this.playAudio(matchedJewels.size);
|
||||
this.playAudio(matchedJewels.size, matchesNeeded);
|
||||
const scoreMatches = matchedJewels.size / 3;
|
||||
const scoreAdd = Math.ceil(scoreMatches ** 2) * 10;
|
||||
this.score += scoreAdd;
|
||||
|
|
@ -667,8 +668,8 @@ export class GameScene extends Phaser.Scene {
|
|||
});
|
||||
}
|
||||
|
||||
playAudio(amount) {
|
||||
if (this.isPlayingAudio === true) {
|
||||
playAudio(amount, matchesNeeded) {
|
||||
if (this.isPlayingAudio === true || matchesNeeded === 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -683,7 +684,7 @@ export class GameScene extends Phaser.Scene {
|
|||
const rand = Phaser.Math.Between(1, 3);
|
||||
audio = `${this.ally}-a${rand}`;
|
||||
}
|
||||
this.sound.play(audio);
|
||||
this.sound.play(audio, { volume: 2 });
|
||||
this.time.delayedCall(2000, () => {
|
||||
this.isPlayingAudio = false;
|
||||
});
|
||||
|
|
@ -992,7 +993,7 @@ export class GameScene extends Phaser.Scene {
|
|||
this.bgMusic.play();
|
||||
|
||||
this.time.delayedCall(4000, () => {
|
||||
this.sound.play(`${this.ally}-intro`);
|
||||
this.sound.play(`${this.ally}-intro`, { volume: 2 });
|
||||
});
|
||||
|
||||
// Refresh the ally video with the new ally
|
||||
|
|
@ -1073,13 +1074,15 @@ export class GameScene extends Phaser.Scene {
|
|||
this.clearAndResetBoard();
|
||||
}
|
||||
this.LevelText.setText(`Level: ${this.level}`);
|
||||
this.sound.play('level-up');
|
||||
this.sound.play('level-complete');
|
||||
this.sound.play('level-up', { volume: .6 });
|
||||
this.time.delayedCall(500, () => {
|
||||
this.sound.play('level-complete', { volume: 2.5 });
|
||||
});
|
||||
|
||||
this.grid.setFillStyle(newLevel.gridColor).setAlpha(0.5);
|
||||
|
||||
if (this.ally !== newLevel.ally) {
|
||||
this.sound.play(`${this.ally}-outro`);
|
||||
this.sound.play(`${this.ally}-outro`, { volume: 2 });
|
||||
this.time.delayedCall(1000, () => {
|
||||
const originalAlly = this.ally;
|
||||
this.ally = newLevel.ally;
|
||||
|
|
|
|||
Loading…
Reference in New Issue