Class SoundPlayer

Namespace
SurvivorsMaker.Presentation
Assembly
SurvivorsMaker.Presentation.dll

Pooled voices for catalog cues with per-cue cooldown and concurrency limits. Simulation events pick their cue through AudioCueRules; variation never consumes gameplay randomness. A missing cue or clip is reported once and plays nothing.

public sealed class SoundPlayer : MonoBehaviour
Inheritance
Object
Component
Behaviour
MonoBehaviour
SoundPlayer
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.GetComponentIndex()
Component.CompareTag(TagHandle)
Component.transform
Component.transformHandle
Component.gameObject
Component.tag
Object.GetEntityId()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Constructors

SoundPlayer()

public SoundPlayer()

Properties

Catalog

public SoundCatalogAsset Catalog { get; }

Property Value

SoundCatalogAsset

Keys

Cue keys of the current catalog (defaults when there is none).

public SoundCueKeys Keys { get; }

Property Value

SoundCueKeys

Music

public MusicPlayer Music { get; set; }

Property Value

MusicPlayer

Methods

Configure(SoundCatalogAsset, PresentationSettings)

public void Configure(SoundCatalogAsset value, PresentationSettings tuning)

Parameters

value SoundCatalogAsset
tuning PresentationSettings

EnsureMusic()

Gets or adds the music player on this object, configured with this catalog.

public MusicPlayer EnsureMusic()

Returns

MusicPlayer

Play(SimEvent)

public void Play(SimEvent value)

Parameters

value SimEvent

Play(SimEvent, SimWorld)

Plays the event's cue. world resolves the firing weapon and fired trigger.

public void Play(SimEvent value, SimWorld world)

Parameters

value SimEvent
world SimWorld

PlayCue(string, Vector3)

Plays any cue by key at a world position. Returns false when it was limited, missing or had no free voice.

public bool PlayCue(string key, Vector3 position)

Parameters

key string
position Vector3

Returns

bool

PlayUi(string)

Plays an interface cue by key (non-spatial). Returns false when it was limited, missing or had no free voice.

public bool PlayUi(string key)

Parameters

key string

Returns

bool

StopAll()

public void StopAll()