fix: Collider2DShapeBehaviour TransformShape ref Requirement

This commit is contained in:
Syntriax 2024-01-27 20:34:58 +03:00
parent affd2bb8c4
commit 6a104d8abd
1 changed files with 2 additions and 1 deletions

View File

@ -5,9 +5,10 @@ namespace Syntriax.Engine.Physics2D;
public class Collider2DShapeBehaviour : Collider2DBehaviourBase, IShapeCollider2D public class Collider2DShapeBehaviour : Collider2DBehaviourBase, IShapeCollider2D
{ {
public Shape ShapeWorld { get; protected set; } = Shape.Box; public Shape ShapeWorld { get => _shapeWorld; protected set => _shapeWorld = value; }
public Shape ShapeLocal { get; set; } = Shape.Box; public Shape ShapeLocal { get; set; } = Shape.Box;
private Shape _shapeWorld = Shape.Box;
public override void CalculateCollider() => Transform.TransformShape(ShapeLocal, ref _shapeWorld); public override void CalculateCollider() => Transform.TransformShape(ShapeLocal, ref _shapeWorld);