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
-
ObjectComponentBehaviourMonoBehaviourSoundPlayer
- Inherited Members
-
MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.destroyCancellationTokenMonoBehaviour.useGUILayoutMonoBehaviour.didStartMonoBehaviour.didAwakeMonoBehaviour.runInEditModeBehaviour.enabledBehaviour.isActiveAndEnabledComponent.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.transformComponent.transformHandleComponent.gameObjectComponent.tagObject.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.nameObject.hideFlags
Constructors
SoundPlayer()
public SoundPlayer()
Properties
Catalog
public SoundCatalogAsset Catalog { get; }
Property Value
Keys
Cue keys of the current catalog (defaults when there is none).
public SoundCueKeys Keys { get; }
Property Value
Music
public MusicPlayer Music { get; set; }
Property Value
Methods
Configure(SoundCatalogAsset, PresentationSettings)
public void Configure(SoundCatalogAsset value, PresentationSettings tuning)
Parameters
valueSoundCatalogAssettuningPresentationSettings
EnsureMusic()
Gets or adds the music player on this object, configured with this catalog.
public MusicPlayer EnsureMusic()
Returns
Play(SimEvent)
public void Play(SimEvent value)
Parameters
valueSimEvent
Play(SimEvent, SimWorld)
Plays the event's cue. world resolves the firing weapon and fired trigger.
public void Play(SimEvent value, SimWorld world)
Parameters
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
keystringpositionVector3
Returns
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
keystring
Returns
StopAll()
public void StopAll()