C# Class MonoGame.Extended.Serialization.ContentManagerJsonConverter

Loads content from a JSON file into the ContentManager using the asset name
Inheritance: JsonConverter
ファイルを表示 Open project: craftworkgames/MonoGame.Extended

Public Methods

Method Description
CanConvert ( Type objectType ) : bool
ContentManagerJsonConverter ( ContentManager contentManager, Func getAssetName ) : System
ReadJson ( JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer ) : object
WriteJson ( JsonWriter writer, object value, JsonSerializer serializer ) : void

Method Details

CanConvert() public method

public CanConvert ( Type objectType ) : bool
objectType Type
return bool

ContentManagerJsonConverter() public method

public ContentManagerJsonConverter ( ContentManager contentManager, Func getAssetName ) : System
contentManager ContentManager
getAssetName Func
return System

ReadJson() public method

public ReadJson ( JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer ) : object
reader JsonReader
objectType Type
existingValue object
serializer JsonSerializer
return object

WriteJson() public method

public WriteJson ( JsonWriter writer, object value, JsonSerializer serializer ) : void
writer JsonWriter
value object
serializer JsonSerializer
return void