Class Sound
- Namespace
- AlphaFramework.World.Components
- Assembly
- AlphaFramework.World.dll
Makes an EntityBase<TCoordinates, TTemplate> emit a positioned 3D sound.
public class Sound : ICloneable
- Inheritance
-
objectSound
- Implements
- Extension Methods
Properties
Attenuation
Factors describing the attenuation of sound intensity over distance.
public Attenuation Attenuation { get; set; }
Property Value
Filename
The filename of the sound file to play.
public string? Filename { get; set; }
Property Value
Shift
A positional offset relative to the entity's origin.
public Vector3 Shift { get; set; }
Property Value
- Vector3
Volume
The playback volume as a factor (0 = silent, 1 = normal).
public float Volume { get; set; }
Property Value
Methods
Clone()
Creates a deep copy of this Sound instance.
public virtual Sound Clone()
Returns
CloneFromTo(Sound, Sound)
Copies all members declared by Sound from one instance to another.
protected static void CloneFromTo(Sound from, Sound to)
Parameters
ShouldSerializeShift()
Used for XML serialization.
public bool ShouldSerializeShift()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.