From 946e048ac6544115a891b0e6dbc1a0113e974ede Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 28 Jan 2025 22:30:18 -0500 Subject: [PATCH] fix(scenes): fix pause in tutorial --- src/gameobjects/pause.ts | 2 +- src/scenes/tutorial.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gameobjects/pause.ts b/src/gameobjects/pause.ts index fadfac3..3d02df2 100644 --- a/src/gameobjects/pause.ts +++ b/src/gameobjects/pause.ts @@ -44,7 +44,7 @@ export function addPause() { text: 'Exit', onClick() { go(Scene.Title) - music.stop() + music?.stop() }, parent: pauseMenu, }) diff --git a/src/scenes/tutorial.ts b/src/scenes/tutorial.ts index 5946975..39f7fd1 100644 --- a/src/scenes/tutorial.ts +++ b/src/scenes/tutorial.ts @@ -11,6 +11,7 @@ import { addReward, addScore, addText, + game, } from '../gameobjects' import { gameState } from '../helpers' @@ -118,7 +119,7 @@ scene(Scene.Tutorial, () => { const { x } = center() instructions.forEach((instruction, index) => { - wait(instruction.start, () => { + game.wait(instruction.start, () => { if (instruction.start) { play(Sound.Shoot, { detune: index * 100 }) }