Class AnimationSound
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
A sound that should play alongside an animation. Open in GitHub
[DocumentAsJson]
public class AnimationSound
- Inheritance
-
AnimationSound
- Inherited Members
- Extension Methods
Fields
Attributes
[JsonIgnore]
public SoundAttributes Attributes
Field Value
Chance
The chance to play this sound.
[DocumentAsJson("Optional", "1", false)]
public float Chance
Field Value
Frame
The sound will play when this frame is reached. Should be set if Looping is false.
[DocumentAsJson("Recommended", "0", false)]
public int Frame
Field Value
Looping
Should this sound loop whilst the animation is playing?
[DocumentAsJson("Optional", "False", false)]
public bool Looping
Field Value
Methods
Clone()
public AnimationSound Clone()
Returns
CreateFromBytes(BinaryReader, string)
public static AnimationSound CreateFromBytes(BinaryReader reader, string version)
Parameters
readerBinaryReaderversionstring
Returns
OnDeserialized(StreamingContext)
[OnDeserialized]
protected void OnDeserialized(StreamingContext context)
Parameters
contextStreamingContext
ToBytes(BinaryWriter)
public void ToBytes(BinaryWriter writer)
Parameters
writerBinaryWriter