HUD.ts

src/ui/HUD.ts
import { 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

Support

Talk to the developers of this project to learn more

We have been building professional websites for big clients for over 15 years. Gallop templates and blocks is our best foundation for SEO websites and web apps.

© 2026 Web Plant Media, LLC