mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 03:56:31 +00:00
Move source projects into source directory
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using MonoGame.Extended.Particles.Modifiers;
|
||||
using MonoGame.Extended.Serialization;
|
||||
|
||||
namespace MonoGame.Extended.Particles.Serialization
|
||||
{
|
||||
public class ModifierJsonConverter : BaseTypeJsonConverter<Modifier>
|
||||
{
|
||||
public ModifierJsonConverter()
|
||||
: base(GetSupportedTypes(), "Modifier")
|
||||
{
|
||||
}
|
||||
|
||||
private static IEnumerable<TypeInfo> GetSupportedTypes()
|
||||
{
|
||||
return typeof(Modifier)
|
||||
.GetTypeInfo()
|
||||
.Assembly
|
||||
.DefinedTypes
|
||||
.Where(type => typeof(Modifier).GetTypeInfo().IsAssignableFrom(type) && !type.IsAbstract);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user