GameAudio
One-paragraph description of what this component does and what it attaches to. Mention any required sibling components (e.g. Model, Transform).
GameAudio
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 while the gameplay clock runs. 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("GameAudio", { exampleNumber = 1.0 })
entity(id).component.get("GameAudio"):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/v2GameAudio — Sneaky Pooper's sound: music per screen and level, ambience per level, and a one-shot on every game.core event. All clips are generated (audio_gen) under game/audio/clips. Plays non-spatial (2D) through three child sources it spawns under its own entity in PLAY: music, ambience, sfx. Music follows Core.state().phase (polled, so it is right whoever changed the phase): title/levelSelect → lounge theme; intro/sneak/escape → the level's pizzicato caper loop; drop → tense sting loop; won → victory jingle; busted/accident/discovered → fail sting. Ambience follows the level while a level is running. A gut rumble repeats faster as urgency rises.
clip(name: string) → void
| arg | type | description |
|---|---|---|
| name | string |
ensureSources( ) → void
mk(name: ?, fields: ?) → void
| arg | type | description |
|---|---|---|
| name | ? | |
| fields | ? |
setBed(which: string, name: string?, looping: boolean) → void
| arg | type | description |
|---|---|---|
| which | string | |
| name | string? | |
| looping | boolean |
sfx(name: string, vol: number?, pitch: number?) → void
| arg | type | description |
|---|---|---|
| name | string | |
| vol | number? | |
| pitch | number? |
voice(name: string, vol: number?) → void
| arg | type | description |
|---|---|---|
| name | string | |
| vol | number? |
onPhase(phase: string, level: number) → void
| arg | type | description |
|---|---|---|
| phase | string | |
| level | number |
bind( ) → void
whistle( ) → void
plop( ) → void
alarm( ) → void
releaseStart( ) → void
seen( ) → void
distraction(kind: ?) → void
| arg | type | description |
|---|---|---|
| kind | ? |
won(stars: ?) → void
| arg | type | description |
|---|---|---|
| stars | ? |
lost(reason: ?) → void
| arg | type | description |
|---|---|---|
| reason | ? |
ui(action: ?) → void
| arg | type | description |
|---|---|---|
| action | ? |
footstep(_surface: ?) → void
| arg | type | description |
|---|---|---|
| _surface | ? |
splash(size: ?) → void
| arg | type | description |
|---|---|---|
| size | ? |
levelStart(id: ?) → void
| arg | type | description |
|---|---|---|
| id | ? |
unbind( ) → void
rebind( ) → void
awake( ) → void
update(dt: ?) → void
| arg | type | description |
|---|---|---|
| dt | ? |
onDestroy( ) → void
report( ) → void
rd(w: ?) → void
| arg | type | description |
|---|---|---|
| w | ? |
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.