helm
SLICE C of *Ninja Pirates of the Baltic* — the wheel, the chase camera and the screen. Loaded by `game.boot` as one of the three build slices.
helm
SLICE C of Ninja Pirates of the Baltic — the wheel, the chase camera and the
screen. Loaded by game.boot as one of the three build slices.
local Helm = require("game.helm")
Helm.start(NPB) -- spawn the rig; its component takes the wheel in awake()
Helm.stop() -- despawn it; the component's onDestroy clears everything
The module is deliberately thin. Everything the slice does lives in
game.helm.Helm, a component, because both surfaces this slice is built on
are component-shaped in this engine: an .inputMap is activated through an
asset-ref field, and a screen's callbacks reach a persistent owner rather than a
loose task. A module holding either would be reaching around the engine.
So start spawns one transient entity, puts game.helm.Helm on it, and stops
there. NPB.claimHelm(), the NPB.registerHelm publication and the "fire"
event are all raised by the component, in awake and update. There is no loop
here to guard with a generation — the component's own update(dt) is the
engine's per-frame call, and it retires with the entity on a reload.
Read game/helm/Helm.component/README.md for the ship model, the camera, the
guns and the HUD, and game/helm/helm.inputMap/README.md for the controls.
Scoped to this part · feeds back into the world's score.