SoundEvent
Builds and emits an SOS sound event to clients.
public sealed class SoundEvent
Namespace: DeadworksManaged.Api.Sounds
Source: Sounds/SoundEvent.cs#L15
Example
new SoundEvent("UI.SomeSoundName") { Volume = 0.8f }
.Emit(RecipientFilter.Single(playerSlot));
Constructors
new SoundEvent()
Signature
public SoundEvent(string name)
Source: Sounds/SoundEvent.cs#L40
Properties
SoundEvent.Name
The soundevent name as defined in a .vsndevts manifest.
Signature
public string Name { get; set; }
Source: Sounds/SoundEvent.cs#L20
SoundEvent.SourceEntityIndex
Entity index the sound emits from. -1 plays at the listener's own position.
Signature
public int SourceEntityIndex { get; set; } = -1;
Source: Sounds/SoundEvent.cs#L23
SoundEvent.StartTime
Optional start-time offset for the event.
Signature
public float StartTime { get; set; }
Source: Sounds/SoundEvent.cs#L26
SoundEvent.Volume
Shortcut for SetFloat("public.volume", ...).
Signature
public float Volume { set; }
Source: Sounds/SoundEvent.cs#L29
SoundEvent.Pitch
Shortcut for SetFloat("public.pitch", ...).
Signature
public float Pitch { set; }
Source: Sounds/SoundEvent.cs#L35
Methods
SoundEvent.SetBool()
Signature
public SoundEvent SetBool(string fieldName, bool value)
Source: Sounds/SoundEvent.cs#L47
SoundEvent.SetInt32()
Signature
public SoundEvent SetInt32(string fieldName, int value)
Source: Sounds/SoundEvent.cs#L53
SoundEvent.SetUInt32()
Signature
public SoundEvent SetUInt32(string fieldName, uint value)
Source: Sounds/SoundEvent.cs#L59
SoundEvent.SetUInt64()
Signature
public SoundEvent SetUInt64(string fieldName, ulong value)
Source: Sounds/SoundEvent.cs#L65
SoundEvent.SetFloat()
Signature
public SoundEvent SetFloat(string fieldName, float value)
Source: Sounds/SoundEvent.cs#L71
SoundEvent.SetFloat3()
Signature
public SoundEvent SetFloat3(string fieldName, float x, float y, float z)
Source: Sounds/SoundEvent.cs#L77
SoundEvent.HasField()
Signature
public bool HasField(string fieldName)
Source: Sounds/SoundEvent.cs#L83
SoundEvent.TryGetFloat()
Signature
public bool TryGetFloat(string fieldName, out float value)
Source: Sounds/SoundEvent.cs#L85
SoundEvent.TryGetInt32()
Signature
public bool TryGetInt32(string fieldName, out int value)
Source: Sounds/SoundEvent.cs#L96
SoundEvent.TryGetBool()
Signature
public bool TryGetBool(string fieldName, out bool value)
Source: Sounds/SoundEvent.cs#L107
SoundEvent.Emit()
Emits the sound to the given recipients. Returns the allocated GUID
Signature
public unsafe uint Emit(RecipientFilter recipients)
Source: Sounds/SoundEvent.cs#L121
SoundEvent.SetParams()
Updates the params of a playing sound identified by guid with this builder's current fields.
Signature
public void SetParams(uint guid, RecipientFilter recipients)
Source: Sounds/SoundEvent.cs#L147
SoundEvent.Stop()
Stops a specific playing sound by its GUID.
Signature
public static void Stop(uint guid, RecipientFilter recipients)
Source: Sounds/SoundEvent.cs#L159
SoundEvent.StopByName()
Stops all playing instances of the named soundevent for the given source entity.
Signature
public static void StopByName(string soundeventName, int sourceEntityIndex, RecipientFilter recipients)
Source: Sounds/SoundEvent.cs#L169