feat: serializable Transform2D
This commit is contained in:
parent
5812f43117
commit
d70bee2c6b
@ -1,3 +1,5 @@
|
|||||||
|
using Syntriax.Engine.Core.Serialization;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Core;
|
namespace Syntriax.Engine.Core;
|
||||||
|
|
||||||
[System.Diagnostics.DebuggerDisplay("Name: {UniverseObject.Name, nq} Position: {Position.ToString(), nq}, Scale: {Scale.ToString(), nq}, Rotation: {Rotation}")]
|
[System.Diagnostics.DebuggerDisplay("Name: {UniverseObject.Name, nq} Position: {Position.ToString(), nq}, Scale: {Scale.ToString(), nq}, Rotation: {Rotation}")]
|
||||||
@ -11,9 +13,9 @@ public class Transform2D : Behaviour, ITransform2D
|
|||||||
private Vector2D _scale = Vector2D.One;
|
private Vector2D _scale = Vector2D.One;
|
||||||
private float _rotation = 0f;
|
private float _rotation = 0f;
|
||||||
|
|
||||||
private Vector2D _localPosition = Vector2D.Zero;
|
[Serialize] private Vector2D _localPosition = Vector2D.Zero;
|
||||||
private Vector2D _localScale = Vector2D.One;
|
[Serialize] private Vector2D _localScale = Vector2D.One;
|
||||||
private float _localRotation = 0f;
|
[Serialize] private float _localRotation = 0f;
|
||||||
|
|
||||||
private ITransform2D? parentTransform = null;
|
private ITransform2D? parentTransform = null;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user