wip: Serialization 2

This commit is contained in:
2024-02-10 17:10:02 +03:00
parent 361a7c53b9
commit 0708ba89cc
13 changed files with 158 additions and 21 deletions

View File

@@ -0,0 +1,8 @@
using System.Collections.Generic;
namespace Engine.Serialization.DTOs;
internal record struct BehaviourControllerDTO(
string ClassType,
List<BehaviourDTO> Behaviours
);

View File

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

View File

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

View File

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

View File

@@ -3,6 +3,7 @@ using Syntriax.Engine.Core;
namespace Engine.Serialization.DTOs;
internal record struct TransformDTO(
string ClassType,
string? ParentId,
Vector2D Position,
Vector2D Scale,