From d1129c95dfd9f9da4a3d023b74b3a4a9e13018f7 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Sat, 5 Apr 2025 17:25:50 +0300 Subject: [PATCH] chore!: renamed Shape2D.Box to Square for consistency --- Engine.Core/Primitives/Shape2D.cs | 2 +- Engine.Physics2D/Collider2DShapeBehaviour.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Engine.Core/Primitives/Shape2D.cs b/Engine.Core/Primitives/Shape2D.cs index eb0dc71..4a0e011 100644 --- a/Engine.Core/Primitives/Shape2D.cs +++ b/Engine.Core/Primitives/Shape2D.cs @@ -16,7 +16,7 @@ namespace Syntriax.Engine.Core; public readonly struct Shape2D(List vertices) : IEnumerable { public static readonly Shape2D Triangle = CreateNgon(3, Vector2D.Up); - public static readonly Shape2D Box = CreateNgon(4, Vector2D.One); + public static readonly Shape2D Square = CreateNgon(4, Vector2D.One); public static readonly Shape2D Pentagon = CreateNgon(5, Vector2D.Up); public static readonly Shape2D Hexagon = CreateNgon(6, Vector2D.Right); diff --git a/Engine.Physics2D/Collider2DShapeBehaviour.cs b/Engine.Physics2D/Collider2DShapeBehaviour.cs index a5d393c..38b455e 100644 --- a/Engine.Physics2D/Collider2DShapeBehaviour.cs +++ b/Engine.Physics2D/Collider2DShapeBehaviour.cs @@ -6,9 +6,9 @@ namespace Syntriax.Engine.Physics2D; public class Collider2DShapeBehaviour : Collider2DBehaviourBase, IShapeCollider2D { public Shape2D ShapeWorld { get => _shapeWorld; protected set => _shapeWorld = value; } - public Shape2D ShapeLocal { get; set; } = Shape2D.Box; + public Shape2D ShapeLocal { get; set; } = Shape2D.Square; - private Shape2D _shapeWorld = Shape2D.Box.CreateCopy(); + private Shape2D _shapeWorld = Shape2D.Square.CreateCopy(); public override void CalculateCollider() => Transform.TransformShape(ShapeLocal, ref _shapeWorld);