diff --git a/src/scenes/lose.ts b/src/scenes/lose.ts index f46d9ad..d642cc9 100644 --- a/src/scenes/lose.ts +++ b/src/scenes/lose.ts @@ -3,27 +3,40 @@ import { addButton, addText } from '../gameobjects' scene(Scene.Lose, () => { const { x, y } = center() - const margin = 100 + const buttonHeight = 80 addText({ width: 400, height: 100, x, - y: y - margin, + y: y - buttonHeight * 2, text: 'Game Over', fontSize: 48, }) addButton({ width: 220, - height: 80, + height: buttonHeight, radius: 8, x, - y: y + margin, + y: y + buttonHeight, text: 'Restart', onClick() { play(Sound.Hit) go(Scene.Game) }, }) + + addButton({ + width: 220, + height: buttonHeight, + radius: 8, + x, + y: y + buttonHeight * 2 + 20, + text: 'Exit', + onClick() { + play(Sound.Hit) + go(Scene.Title) + }, + }) })