Table of Contents

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

assetLocation AssetLocation
withRandomPitch bool

Fields

Location

[JsonProperty("path")]
public AssetLocation? Location

Field Value

AssetLocation

NatFloatOne

public static NatFloat NatFloatOne

Field Value

NatFloat

Pitch

public NatFloat Pitch

Field Value

NatFloat

RandomPitch

public static NatFloat RandomPitch

Field Value

NatFloat

Range

public float Range

Field Value

float

Type

[JsonProperty("soundType")]
public EnumSoundType Type

Field Value

EnumSoundType

Volume

public NatFloat Volume

Field Value

NatFloat

Methods

Clone()

public SoundAttributes Clone()

Returns

SoundAttributes

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Equals(SoundAttributes)

public bool Equals(SoundAttributes other)

Parameters

other SoundAttributes

Returns

bool

FromBytes(BinaryReader, string)

public static SoundAttributes FromBytes(BinaryReader reader, string version)

Parameters

reader BinaryReader
version string

Returns

SoundAttributes

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

writer BinaryWriter

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

left SoundAttributes?
right SoundAttributes?

Returns

bool

operator !=(SoundAttributes?, SoundAttributes?)

public static bool operator !=(SoundAttributes? left, SoundAttributes? right)

Parameters

left SoundAttributes?
right SoundAttributes?

Returns

bool