wip: Serialization

This commit is contained in:
2024-02-09 17:50:39 +03:00
parent 2cf6135063
commit 361a7c53b9
13 changed files with 411 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
namespace Engine.Serialization.DTOs;
internal record struct BehaviourDTO(
string ClassName,
int Priority,
StateEnableDTO StateEnable
);

View File

@@ -0,0 +1,11 @@
using System.Collections.Generic;
namespace Engine.Serialization.DTOs;
internal record struct GameObjectDTO(
string Id,
string Name,
TransformDTO Transform,
List<BehaviourDTO> Behaviours,
StateEnableDTO StateEnable
);

View File

@@ -0,0 +1,6 @@
namespace Engine.Serialization.DTOs;
internal record struct StateEnableDTO(
string ClassName,
bool Enabled
);

View File

@@ -0,0 +1,10 @@
using Syntriax.Engine.Core;
namespace Engine.Serialization.DTOs;
internal record struct TransformDTO(
string? ParentId,
Vector2D Position,
Vector2D Scale,
float Rotation
);