Talos docs

AudioProps

Since 0.6
Plain text

Signature

export interface AudioProps {
  /**
   * Event name → cue. A cue is an asset id, a sound to play, or one of the three mixer
   * cues: `{ kind: "bus", bus, volume, seconds }`, `{ kind: "snapshot", snapshot }`,
   * `{ kind: "music", layer, crossfade }`. All JSON, so ducking the music when a boss
   * appears is a scene edit rather than a behavior.
   */
  triggers?: Record<string, string | AudioCue>
  /** Bus for cues that do not name one. */
  defaultBus?: AudioBus
  /** Multiplier over every cue this entity plays. */
  masterVolume?: number
  /** Stop everything this entity started when the behavior is detached. Default true. */
  stopOnDispose?: boolean
}

Import: import type { AudioProps } from "@argus/gameplay"

Members

MemberSignatureDescription
triggerstriggers?: Record<string, string | AudioCue>Event name → cue. A cue is an asset id, a sound to play, or one of the three mixer cues: { kind: "bus", bus, volume, seconds }, { kind: "snapshot", snapshot }, { kind: "music", layer, crossfade }. All JSON, so ducking the music when a boss appears is a scene edit rather than a behavior.
defaultBusdefaultBus?: AudioBusBus for cues that do not name one.
masterVolumemasterVolume?: numberMultiplier over every cue this entity plays.
stopOnDisposestopOnDispose?: booleanStop everything this entity started when the behavior is detached. Default true.