Scene serialization progress
This commit is contained in:
@@ -6,7 +6,7 @@ namespace DaggerFramework.SceneGraph
|
||||
{
|
||||
public class EntityLayer : Layer
|
||||
{
|
||||
[JsonInclude] public List<Entity> Entities { get; set; }
|
||||
public List<Entity> Entities { get; set; }
|
||||
public Camera2d? CurrentCamera { get; set; }
|
||||
|
||||
public EntityLayer(List<Entity> entities)
|
||||
@@ -105,4 +105,12 @@ namespace DaggerFramework.SceneGraph
|
||||
}
|
||||
private List<Camera2d> _cameraEntities = new();
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(EntityLayer))]
|
||||
[JsonSerializable(typeof(Entity))]
|
||||
[JsonSerializable(typeof(List<Entity>))]
|
||||
internal partial class EntityLayerContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user