src/ui/HUD.tsimport { Container, Text } from 'pixi.js';import { COLORS } from '../constants';/*** In-game HUD: score readout in the top-left. Lives in a separate Container* so it can be added to game.uiRoot (above scenes) or to a single scene.** Usage:* const hud = new HUD();* game.uiRoot.addChild(hud);* hud.setScore(3, 5);* hud.resize(width, height);*/export class HUD extends Container {private scoreText: Text;private subtitleText: Text;constructor() {super();
Showing the first 20 lines.
Get full code