Log inGet started
Package

Hud.component

Newest version

README.md

umbral.Hud

The face of UMBRAL, on the camera rig: the HUD, the title screen and the map.

Attaches to: the CameraRig of the scene's PlayerPrototype (the scene calls tryAttach(rig, "umbral.Hud", {})), beside the Camera, umbral.Look and AudioListener.

What it puts on the glass

  • umbral_hud — the corner of play.png: bell medallion, VIDA and CORO in tapered bronze cases, the region name, the way into the map. Layer 20.
  • umbral_title — title.png: the bronze wordmark, the subtitle, the drowned bell, the filigree corners, the menu. Shown on entering play, layer 60, and taken down by NUEVA PARTIDA.
  • umbral_map — the rooms of umbral.Config.MAP drawn as a plan, with Ilva's mark on it.

All three scale from ui.screenSize().width, so a phone gets the same display fitted to a 410-point canvas.

What it reads

health, healthMax, coro and coroMax off the local player's umbral.Ilva component, found through layers.active.players.localPlayer, its children, or the body entity. Every read is pcalled and falls back to a safe value, because that component is another slice's and may not be attached yet. The bars ease toward the values rather than snapping.

The region comes from the world position against umbral.Config.REGIONS, and the same walk drives the region's bordón, Ilva's footsteps (one per stride of travel), the impact when a landed strike fills the Coro, a lower impact when health drops, and the bell on the echo control. Slots the engine cannot answer are skipped, never raised.

Callbacks

title_new, title_options, title_quit, toggle_map, close_map. They only fire in play.