Skip to content

Commit

Permalink
chore(scenes): improve textbox in game
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Jan 23, 2025
1 parent c181b53 commit d9a54b0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/scenes/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,19 @@ import { addEnemy, addHealth, addPlayer, playMusic } from '../gameobjects'
import { outsideCoordinates } from '../helpers'

scene(Scene.Game, () => {
add([text('Press arrow keys', { width: width() / 2 }), pos(12, 12)])
const textbox = add([
rect(580, 80),
pos(center().x - 580 / 2, 12),
color(255, 255, 255),
])

textbox.add([
text('WASD or arrow keys to move\nLeft click to shoot', {
width: width() / 2,
}),
pos(4, 4),
color(0, 0, 0),
])

playMusic()

Expand Down

0 comments on commit d9a54b0

Please sign in to comment.