SoundServices

Namespace: Murder.Services
Assembly: Murder.dll

public static class SoundServices

⭐ Methods

GetGlobalParameter(ParameterId)

public float GetGlobalParameter(ParameterId id)

Parameters
id ParameterId

Returns
float

ReplaceIdentifiers(ImmutableDictionary<TKey, TValue>, Func<T, TResult>)

public ImmutableDictionary<TKey, TValue> ReplaceIdentifiers(ImmutableDictionary<TKey, TValue> source, Func<T, TResult> converter)

Parameters
source ImmutableDictionary<TKey, TValue>
converter Func<T, TResult>

Returns
ImmutableDictionary<TKey, TValue>

StopAll(bool, HashSet)

public SoundEventId[] StopAll(bool fadeOut, HashSet<T> exceptFor)

Parameters
fadeOut bool
exceptFor HashSet<T>

Returns
SoundEventId[]

StopAll(bool)

public SoundEventId[] StopAll(bool fadeOut)

Stop all the ongoing events.

Parameters
fadeOut bool

Returns
SoundEventId[]

GetSpatialAttributes(Entity)

public T? GetSpatialAttributes(Entity target)

Return the spatial attributes for playing a sound from .

Parameters
target Entity

Returns
T?

TryGetSoundForEvent(Entity, string)

public T? TryGetSoundForEvent(Entity e, string animationEventId)

Try to get a sound id associated with an on an entity with an EventListenerComponent.

Parameters
e Entity

animationEventId string

Returns
T?

Play(SoundEventId, Entity, SoundProperties)

public ValueTask Play(SoundEventId id, Entity target, SoundProperties properties)

Parameters
id SoundEventId
target Entity
properties SoundProperties

Returns
ValueTask

Play(SoundEventId, SoundProperties, T?)

public ValueTask Play(SoundEventId id, SoundProperties properties, T? attributes)

Parameters
id SoundEventId
properties SoundProperties
attributes T?

Returns
ValueTask

PlayMusic(SoundEventId)

public ValueTask PlayMusic(SoundEventId id)

Parameters
id SoundEventId

Returns
ValueTask

SetGlobalParameter(ParameterId, T)

public void SetGlobalParameter(ParameterId id, T value)

Parameters
id ParameterId
value T

Stop(T?, bool)

public void Stop(T? id, bool fadeOut)

Parameters
id T?
fadeOut bool

TrackEventSourcePosition(SoundEventId, Entity)

public void TrackEventSourcePosition(SoundEventId eventId, Entity e)

Parameters
eventId SoundEventId
e Entity