refactor: Shape2D converted into a class as it has a reference type

This commit is contained in:
2025-05-02 12:46:23 +03:00
parent b100b5c2fe
commit fc3c1ed1f9
2 changed files with 33 additions and 15 deletions

View File

@@ -18,7 +18,7 @@ public class Collider2DShapeBehaviour : Collider2DBehaviourBase, IShapeCollider2
private Shape2D _shapeWorld = Shape2D.Square.CreateCopy();
private Shape2D _shapeLocal = Shape2D.Square;
public override void CalculateCollider() => Transform.Transform(ShapeLocal, ref _shapeWorld);
public override void CalculateCollider() => ShapeLocal.Transform(Transform, _shapeWorld);
public Collider2DShapeBehaviour() { }
public Collider2DShapeBehaviour(Shape2D shape)