mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 12:06:37 +00:00
Particles data driven (#388)
* yay, a start on data driven particles * added data driven support for all particle profiles * pretty much finished all of the particle serialization code * resolved an inconsistency with the interpolators
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using MonoGame.Extended.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace MonoGame.Extended.Particles.Serialization
|
||||
{
|
||||
public sealed class ParticleJsonSerializer : JsonSerializer
|
||||
{
|
||||
public ParticleJsonSerializer(ITextureRegionService textureRegionService)
|
||||
{
|
||||
Converters.Add(new Vector2JsonConverter());
|
||||
Converters.Add(new Size2JsonConverter());
|
||||
Converters.Add(new ColorJsonConverter());
|
||||
Converters.Add(new TextureRegion2DJsonConverter(textureRegionService));
|
||||
Converters.Add(new ProfileJsonConverter());
|
||||
Converters.Add(new ModifierJsonConverter());
|
||||
Converters.Add(new InterpolatorJsonConverter());
|
||||
Converters.Add(new TimeSpanJsonConverter());
|
||||
Converters.Add(new RangeJsonConverter<int>());
|
||||
Converters.Add(new RangeJsonConverter<float>());
|
||||
Converters.Add(new HslColorJsonConverter());
|
||||
Converters.Add(new ModifierExecutionStrategyJsonConverter());
|
||||
ContractResolver = new ShortNameJsonContractResolver();
|
||||
Formatting = Formatting.Indented;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user