GameHud
Everything drawn on the screen. Attached to the `hud` entity by the scene.
GameHud
Everything drawn on the screen. Attached to the hud entity by the scene.
Registers five screens and keeps them in step with game.shift:
cs_title— the title card: CHAINSAW / SIMULATOR and the shift menu.cs_order— the paper order docket pinned top right,CUTS n OF m.cs_gauge— the RPM dial's static half (registered again only when the canvas changes), andcs_gauge_needle, its per-frame needle and heat.cs_controls— the controls strip, printed once when the shift begins.cs_payslip— the stamped pay slip, fromShift.summary().
The title's START SHIFT calls Shift.begin(); the slip's button calls
Shift.reset(). The HUD never writes the saw's or the workpieces' fields.
Siblings it needs: game.saw.ChainsawRig (writes rpm/heat/stalled),
game.workpieces.WorkpieceSystem (writes pieceKey/pieceRemaining and calls
Shift.addCut). Everything under game/ui/ is this component's.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game/ui/GameHud.component — everything drawn on the screen. Owns the screens: the title card, the order sheet pinned top right, the RPM and heat gauge bottom centre, the controls strip, and the pay slip that ends the shift. Owns every asset under game/ui/. It reads game.shift's state for what to draw and calls game.shift's begin() / reset() for what the player presses. It never touches a workpiece or the saw directly. The gauge is two screens: the dial, which only changes with the canvas, and the needle, which is redrawn from rpm and heat. The card is redrawn when the order ticks; the title only when its menu opens something.
scale( ) → void
show(name: ?, on: ?) → void
| arg | type | description |
|---|---|---|
| name | ? | |
| on | ? |
buildTitle( ) → void
buildOrder( ) → void
gaugeState( ) → void
registerDial( ) → void
awake( ) → void
updateStrip( ) → void
The strip prints itself on the first begin, then fades back out. The engine is told about a change here only when there is one: re-issuing the same tree, or hiding a hidden screen, re-lays the whole UI out every frame.
tick(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
update(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
editorUpdate(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
onCallback(id: ?) → void
Every control the screens carry lands here: the title's menu, and the pay slip's fresh start.
| arg | type | description |
|---|---|---|
| id | ? |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.