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 }) }