Struct SoundAttributes
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
[DocumentAsJson]
public struct SoundAttributes
- Inherited Members
- Extension Methods
Constructors
SoundAttributes()
public SoundAttributes()
SoundAttributes(AssetLocation, bool)
public SoundAttributes(AssetLocation assetLocation, bool withRandomPitch)
Parameters
assetLocationAssetLocationwithRandomPitchbool
Fields
Location
[JsonProperty("path")]
public AssetLocation? Location
Field Value
NatFloatOne
public static NatFloat NatFloatOne
Field Value
Pitch
public NatFloat Pitch
Field Value
RandomPitch
public static NatFloat RandomPitch
Field Value
Range
public float Range
Field Value
Type
[JsonProperty("soundType")]
public EnumSoundType Type
Field Value
Volume
public NatFloat Volume
Field Value
Methods
Clone()
public SoundAttributes Clone()
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
Equals(SoundAttributes)
public bool Equals(SoundAttributes other)
Parameters
otherSoundAttributes
Returns
FromBytes(BinaryReader, string)
public static SoundAttributes FromBytes(BinaryReader reader, string version)
Parameters
readerBinaryReaderversionstring
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToBytes(BinaryWriter)
public void ToBytes(BinaryWriter writer)
Parameters
writerBinaryWriter
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(SoundAttributes?, SoundAttributes?)
public static bool operator ==(SoundAttributes? left, SoundAttributes? right)
Parameters
leftSoundAttributes?rightSoundAttributes?
Returns
operator !=(SoundAttributes?, SoundAttributes?)
public static bool operator !=(SoundAttributes? left, SoundAttributes? right)
Parameters
leftSoundAttributes?rightSoundAttributes?