cf_director
One-paragraph description of what this component does and what it attaches to. Mention any required sibling components (e.g. Model, Transform).
[name]
One-paragraph description of what this component does and what it attaches to. Mention any required sibling components (e.g. Model, Transform).
Public fields
exampleNumber: number— what it controls, units, valid range.exampleString: string— what it controls.exampleBool: boolean— what it controls.
Methods
:methodName(arg)— what it does and when to call it.
Lifecycle
awake()— same-frame attach hook. What initial state this component sets up.start()— first-frame-after-awake hook. Cross-component setup that needs the other components on the entity to have finishedawake.update(dt)— per-frame, play mode only. What this component does each tick.onDestroy()— cleanup performed on detach / entity despawn.
See man components for the full hook list (onEnable, fixedUpdate,
onPropertyChanged, etc.) and the timing details.
Usage
entity(id).component.add("[name]", { exampleNumber = 1.0 })
entity(id).component.get("[name]"):methodName("foo")
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2COINFALL's director. Owns the run: which phase the game is in, when the hall exists, which machine is live, what corruption is doing to the look and the sound, and when a run ends. Every other piece is deliberately dumber than this one -- `cf_state` holds the numbers, `cf_machine` holds one field, `cf_ui` draws, and this decides.
defineActions( ) → void
ensureEmitter(name: string, y: number, props: ?) → void
The three emitters are ADOPTED by name before any is spawned. This component hot-reloads, and a reload clears the module locals holding the handles -- so a check that only reads those locals spawns a second hum every reload and a third the time after, each looping the same clip a frame out of phase.
| arg | type | description |
|---|---|---|
| name | string | |
| y | number | |
| props | ? |
ensureAudio( ) → void
play(clipRef: ?, volume: number, pitch: number) → void
One-shots all ride the single host, which keeps the sound bank to one Audio component instead of one per emitter.
| arg | type | description |
|---|---|---|
| clipRef | ? | |
| volume | number | |
| pitch | number |
driveLook(dt: ?) → void
Everything corruption does to the presentation, in one place, driven from one number. The fog closes in, the palette rots, the snap lattice coarsens (in the shader), the tube tears, and the hum and the servo detune.
| arg | type | description |
|---|---|---|
| dt | ? |
tearDownWorld( ) → void
buildWorld( ) → void
onMachineBank(index: number, payload: ?) → void
| arg | type | description |
|---|---|---|
| index | number | |
| payload | ? |
onMachineRelic(index: number) → void
| arg | type | description |
|---|---|---|
| index | number |
onMachinePush(index: number) → void
| arg | type | description |
|---|---|---|
| index | number |
onMachineCleared(index: number) → void
| arg | type | description |
|---|---|---|
| index | number |
setPhase(p: string) → void
| arg | type | description |
|---|---|---|
| p | string |
beginIntro( ) → void
Before the first machine, a closing inventory prints itself. It is the only place the game says anything about what happened here, and it never says it outright: the story is the arithmetic between two lines of an inventory.
endIntro( ) → void
updateIntro(dt: ?) → void
The head prints one character at a time and pauses at the end of each line. Reading is the pacing: a document that lands whole is a wall of text, and one that crawls is a wait.
| arg | type | description |
|---|---|---|
| dt | ? |
startRun(seed: number) → void
| arg | type | description |
|---|---|---|
| seed | number |
endRun(cause: string) → void
| arg | type | description |
|---|---|---|
| cause | string |
abandonRun( ) → void
localAvatar( ) → void
bindCamera( ) → boolean
setMoverEnabled(on: boolean) → void
Freeze the avatar's own mover: while the player is locked to a machine, and while no run is live. The prototype's controller stays exactly where the scene author put it; only its enabled flag moves.
| arg | type | description |
|---|---|---|
| on | boolean |
clearMomentum(av: ?) → void
The body carries whatever speed it built up before it was placed. Clearing that is part of placing the player: setting the position alone is undone on the very next tick by the velocity still sitting in the controller.
| arg | type | description |
|---|---|---|
| av | ? |
placePlayer( ) → void
cameraRig( ) → void
poseQuat(yaw: number, pitch: number) → void
A yaw/pitch pair as a quaternion (Y then X). The camera looks down its local -Z, so a yaw of `m.yaw` aims it straight into a machine standing at that yaw.
| arg | type | description |
|---|---|---|
| yaw | number | |
| pitch | number |
enterPlay(index: number) → void
| arg | type | description |
|---|---|---|
| index | number |
exitPlay( ) → void
awake( ) → void
newGame(seed: ?) → void
| arg | type | description |
|---|---|---|
| seed | ? |
continueRun( ) → void
takeRelic(id: ?) → void
| arg | type | description |
|---|---|---|
| id | ? |
resume( ) → void
settingsChanged( ) → void
snapshot( ) → void
uiState( ) → void
Everything the HUD draws, in one call. The UI pulls this rather than reading the hub's state table directly: the command surface is the one channel proven to reach this component across a hot reload, and a HUD that silently draws a stale phase is worse than no HUD.
applySettings(next: ?) → void
The UI owns the settings screen but the director owns what they DO, so the whole table travels back through the same channel.
| arg | type | description |
|---|---|---|
| next | ? |
debugEnter(i: ?) → void
The validation surface: drive the whole game without a keyboard.
| arg | type | description |
|---|---|---|
| i | ? |
debugDrop(n: ?) → void
| arg | type | description |
|---|---|---|
| n | ? |
debugFire(slot: ?) → void
| arg | type | description |
|---|---|---|
| slot | ? |
debugBank(amount: ?) → void
| arg | type | description |
|---|---|---|
| amount | ? |
debugRelic( ) → void
start( ) → void
onDestroy( ) → void
dropCoins(count: number) → void
| arg | type | description |
|---|---|---|
| count | number |
fireActive(slot: number) → void
| arg | type | description |
|---|---|---|
| slot | number |
updateWalk(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
updatePlay(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
onQuotaFailed( ) → void
updateShrine(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
readInput( ) → void
burnAtShrine( ) → void
cashOut( ) → void
update(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
editorUpdate(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
report( ) → any
The run's numbers, for a data query during validation.
persistResidue( ) → boolean
Persist the run's residue into the world's settings. Refused in play mode like any source write, so the director calls it on the way back to edit.
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
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.