refactor!: removed noise from class names
Renamed classes with names XBehaviour to X
This commit is contained in:
28
Engine.Physics2D/Collider2DShape.cs
Normal file
28
Engine.Physics2D/Collider2DShape.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Syntriax.Engine.Core;
|
||||
|
||||
namespace Syntriax.Engine.Physics2D;
|
||||
|
||||
public class Collider2DShape : Collider2DBase, IShapeCollider2D
|
||||
{
|
||||
public Shape2D ShapeWorld { get => _shapeWorld; protected set => _shapeWorld = value; }
|
||||
public Shape2D ShapeLocal
|
||||
{
|
||||
get => _shapeLocal;
|
||||
set
|
||||
{
|
||||
_shapeLocal = value;
|
||||
NeedsRecalculation = true;
|
||||
}
|
||||
}
|
||||
|
||||
private Shape2D _shapeWorld = Shape2D.Square;
|
||||
private Shape2D _shapeLocal = Shape2D.Square;
|
||||
|
||||
public override void CalculateCollider() => ShapeLocal.Transform(Transform, _shapeWorld);
|
||||
|
||||
public Collider2DShape() { }
|
||||
public Collider2DShape(Shape2D shape)
|
||||
{
|
||||
ShapeLocal = shape;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user