Skip to content

Commit

Permalink
Music intermission layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Matojeje committed Aug 20, 2024
1 parent 2cc7956 commit 5fcce12
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions src/scenes/GameScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1403,21 +1403,17 @@ export class GameScene extends BaseScene {
downtime: 0,
}

switch (this.state) {
case GameState.Shopping:
case GameState.Cutscene:
case GameState.Intermission:
intendedVolume = {
base: 0,
cutscene: 0,
downtime: 1,
};
break;

case GameState.Day:
default:
break;
}
if (this.state != GameState.Day) intendedVolume = {
base: 0,
cutscene: 0,
downtime: 1,
};

if (this.intermission.visible) intendedVolume = {
base: 0,
cutscene: 1,
downtime: 0,
};

this.musicBase.setVolume(intendedVolume.base * volumeModifier);
this.musicDowntime.setVolume(intendedVolume.downtime * volumeModifier);
Expand Down

0 comments on commit 5fcce12

Please sign in to comment.