refactor: DebuggerDisplays For Basic Types
This commit is contained in:
parent
b14d10db0c
commit
7b47703ba0
|
@ -5,6 +5,7 @@ using Syntriax.Engine.Core.Exceptions;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Core;
|
namespace Syntriax.Engine.Core;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("Priority: {Priority}, Initialized: {Initialized}")]
|
||||||
public abstract class Behaviour : IBehaviour
|
public abstract class Behaviour : IBehaviour
|
||||||
{
|
{
|
||||||
public Action<IAssignable>? OnUnassigned { get; set; } = null;
|
public Action<IAssignable>? OnUnassigned { get; set; } = null;
|
||||||
|
|
|
@ -7,6 +7,7 @@ using Syntriax.Engine.Core.Abstract;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Core;
|
namespace Syntriax.Engine.Core;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("Behaviour Count: {behaviours.Count()}")]
|
||||||
public class BehaviourController : IBehaviourController
|
public class BehaviourController : IBehaviourController
|
||||||
{
|
{
|
||||||
public Action<IBehaviourController>? OnPreUpdate { get; set; }
|
public Action<IBehaviourController>? OnPreUpdate { get; set; }
|
||||||
|
|
|
@ -8,6 +8,7 @@ using Syntriax.Engine.Core.Factory;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Core;
|
namespace Syntriax.Engine.Core;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("GameObject Count: {_gameObjects.Count()}")]
|
||||||
public class GameManager : IEntity, IEnumerable<IGameObject>
|
public class GameManager : IEntity, IEnumerable<IGameObject>
|
||||||
{
|
{
|
||||||
public Action<GameManager>? OnCameraChanged { get; set; } = null;
|
public Action<GameManager>? OnCameraChanged { get; set; } = null;
|
||||||
|
|
|
@ -5,6 +5,7 @@ using Syntriax.Engine.Core.Exceptions;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Core;
|
namespace Syntriax.Engine.Core;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("Name: {Name}, Initialized: {Initialized}")]
|
||||||
public class GameObject : IGameObject
|
public class GameObject : IGameObject
|
||||||
{
|
{
|
||||||
public Action<IAssignableStateEnable>? OnStateEnableAssigned { get; set; } = null;
|
public Action<IAssignableStateEnable>? OnStateEnableAssigned { get; set; } = null;
|
||||||
|
|
|
@ -4,6 +4,7 @@ using Syntriax.Engine.Core.Abstract;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Core;
|
namespace Syntriax.Engine.Core;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("Position: {Position.ToString(), nq}, Scale: {Scale.ToString(), nq}, Rotation: {Rotation}")]
|
||||||
public class Transform : ITransform
|
public class Transform : ITransform
|
||||||
{
|
{
|
||||||
public Action<ITransform>? OnPositionChanged { get; set; } = null;
|
public Action<ITransform>? OnPositionChanged { get; set; } = null;
|
||||||
|
|
|
@ -3,6 +3,7 @@ using Syntriax.Engine.Physics2D.Abstract;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Physics2D;
|
namespace Syntriax.Engine.Physics2D;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("Normal: {Normal.ToString(), nq}, Penetration: {Penetration}")]
|
||||||
public readonly struct CollisionDetectionInformation
|
public readonly struct CollisionDetectionInformation
|
||||||
(
|
(
|
||||||
ICollider2D Left,
|
ICollider2D Left,
|
||||||
|
|
|
@ -4,6 +4,7 @@ using Syntriax.Engine.Core;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Physics2D.Primitives;
|
namespace Syntriax.Engine.Physics2D.Primitives;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("LowerBoundary: {LowerBoundary.ToString(), nq}, UpperBoundary: {UpperBoundary.ToString(), nq}")]
|
||||||
public readonly struct AABB(Vector2D LowerBoundary, Vector2D UpperBoundary)
|
public readonly struct AABB(Vector2D LowerBoundary, Vector2D UpperBoundary)
|
||||||
{
|
{
|
||||||
public readonly Vector2D LowerBoundary { get; init; } = LowerBoundary;
|
public readonly Vector2D LowerBoundary { get; init; } = LowerBoundary;
|
||||||
|
|
|
@ -3,6 +3,7 @@ using Syntriax.Engine.Core.Abstract;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Physics2D.Primitives;
|
namespace Syntriax.Engine.Physics2D.Primitives;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("Center: {Center.ToString(), nq}, Radius: {Radius}")]
|
||||||
public readonly struct Circle(Vector2D Center, float Radius)
|
public readonly struct Circle(Vector2D Center, float Radius)
|
||||||
{
|
{
|
||||||
public readonly Vector2D Center { get; init; } = Center;
|
public readonly Vector2D Center { get; init; } = Center;
|
||||||
|
|
|
@ -6,6 +6,7 @@ using Syntriax.Engine.Core;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Physics2D.Primitives;
|
namespace Syntriax.Engine.Physics2D.Primitives;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("From: {From.ToString(), nq}, To: {To.ToString(), nq}, Direction: {Direction.ToString(), nq}, Length: {Length}")]
|
||||||
public readonly struct Line(Vector2D From, Vector2D To)
|
public readonly struct Line(Vector2D From, Vector2D To)
|
||||||
{
|
{
|
||||||
public readonly Vector2D From { get; init; } = From;
|
public readonly Vector2D From { get; init; } = From;
|
||||||
|
|
|
@ -2,6 +2,7 @@ using Syntriax.Engine.Core;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Physics2D.Primitives;
|
namespace Syntriax.Engine.Physics2D.Primitives;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("y = {Slope}x + {OffsetY}")]
|
||||||
public readonly struct LineEquation(float Slope, float OffsetY)
|
public readonly struct LineEquation(float Slope, float OffsetY)
|
||||||
{
|
{
|
||||||
public readonly float Slope { get; init; } = Slope;
|
public readonly float Slope { get; init; } = Slope;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
namespace Syntriax.Engine.Physics2D.Primitives;
|
namespace Syntriax.Engine.Physics2D.Primitives;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("Min: {Min}, Max: {Max}")]
|
||||||
public readonly struct Projection(float Min, float Max)
|
public readonly struct Projection(float Min, float Max)
|
||||||
{
|
{
|
||||||
public readonly float Min { get; init; } = Min;
|
public readonly float Min { get; init; } = Min;
|
||||||
|
|
|
@ -6,6 +6,7 @@ using Syntriax.Engine.Core.Abstract;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Physics2D.Primitives;
|
namespace Syntriax.Engine.Physics2D.Primitives;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("Vertices Count: {Vertices.Count()}")]
|
||||||
public readonly struct Shape(IList<Vector2D> Vertices) : IEnumerable<Vector2D>
|
public readonly struct Shape(IList<Vector2D> Vertices) : IEnumerable<Vector2D>
|
||||||
{
|
{
|
||||||
public static readonly Shape Triangle = CreateNgon(3, Vector2D.Up);
|
public static readonly Shape Triangle = CreateNgon(3, Vector2D.Up);
|
||||||
|
|
|
@ -4,6 +4,7 @@ using Syntriax.Engine.Core;
|
||||||
|
|
||||||
namespace Syntriax.Engine.Physics2D.Primitives;
|
namespace Syntriax.Engine.Physics2D.Primitives;
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerDisplay("A: {A.ToString(), nq}, B: {B.ToString(), nq}, B: {C.ToString(), nq}")]
|
||||||
public readonly struct Triangle(Vector2D A, Vector2D B, Vector2D C)
|
public readonly struct Triangle(Vector2D A, Vector2D B, Vector2D C)
|
||||||
{
|
{
|
||||||
public readonly Vector2D A { get; init; } = A;
|
public readonly Vector2D A { get; init; } = A;
|
||||||
|
|
Loading…
Reference in New Issue