Log inGet started
Package

GameUi.component

Newest version

README.md

GameUi

The whole interface of PYRAMID, hung on the scene's Hud entity by scenes/main.scene/entrypoint.luau at play start.

It reads pyramid.state and pyramid.rules and writes only what a hand on the screen must write:

  • the build bar sets State.selected (pyramid.rules.TOWERS drives the cards)
  • SEND WAVE calls State.requestWave()
  • PRESS START opens the night (State.setPhase("build"))
  • RAISE AGAIN on the end plate calls State.reset()

Everything else — stone, wave, phase, tower count — is only read, so the HUD follows the run without knowing what an enemy or a tower is.

Three screens, owned by this instance and torn down with it: pyramid_hud (in play), pyramid_title (phase title), pyramid_end (phase won / lost). The trees are built by pyramid.ui.screens from pyramid.ui.theme, and the HUD is re-sent only when a value it shows changes.

No sibling components are required; it works with the scene alone.