Table of Contents

Class SoundAttributeConverter

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public class SoundAttributeConverter : JsonConverter<SoundAttributes?>
Inheritance
JsonConverter
JsonConverter<SoundAttributes?>
SoundAttributeConverter
Inherited Members
JsonConverter.CanRead
Extension Methods

Constructors

SoundAttributeConverter(bool)

public SoundAttributeConverter(bool randomPitch)

Parameters

randomPitch bool

SoundAttributeConverter(bool, float)

public SoundAttributeConverter(bool randomPitch, float defaultRange)

Parameters

randomPitch bool
defaultRange float

Fields

AddSoundsPrefix

public bool AddSoundsPrefix

Field Value

bool

DefaultRange

public float DefaultRange

Field Value

float

RandomPitch

public bool RandomPitch

Field Value

bool

Properties

CanWrite

public override bool CanWrite { get; }

Property Value

bool

Methods

ReadJson(JsonReader, Type, SoundAttributes?, bool, JsonSerializer)

public override SoundAttributes? ReadJson(JsonReader reader, Type objectType, SoundAttributes? existingValue, bool hasExistingValue, JsonSerializer serializer)

Parameters

reader JsonReader
objectType Type
existingValue SoundAttributes?
hasExistingValue bool
serializer JsonSerializer

Returns

SoundAttributes?

WriteJson(JsonWriter, SoundAttributes?, JsonSerializer)

public override void WriteJson(JsonWriter writer, SoundAttributes? value, JsonSerializer serializer)

Parameters

writer JsonWriter
value SoundAttributes?
serializer JsonSerializer