chore!: renamed Shape2D.Box to Square for consistency
This commit is contained in:
parent
40f483974d
commit
d1129c95df
@ -16,7 +16,7 @@ namespace Syntriax.Engine.Core;
|
||||
public readonly struct Shape2D(List<Vector2D> vertices) : IEnumerable<Vector2D>
|
||||
{
|
||||
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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user