2024-01-24 19:21:53 +03:00
|
|
|
using Syntriax.Engine.Physics2D.Abstract;
|
|
|
|
using Syntriax.Engine.Physics2D.Primitives;
|
|
|
|
|
|
|
|
namespace Syntriax.Engine.Physics2D;
|
|
|
|
|
2024-01-25 20:42:49 +03:00
|
|
|
public class Collider2DCircleBehaviour : Collider2DBehaviourBase, ICircleCollider2D
|
2024-01-24 19:21:53 +03:00
|
|
|
{
|
2024-01-27 20:20:28 +03:00
|
|
|
public Circle CircleWorld { get; protected set; } = Circle.UnitCircle;
|
|
|
|
public Circle CircleLocal { get; set; } = Circle.UnitCircle;
|
2024-01-24 19:21:53 +03:00
|
|
|
|
|
|
|
|
2024-01-25 22:00:49 +03:00
|
|
|
public override void CalculateCollider() => CircleWorld = Transform.TransformCircle(CircleLocal);
|
2024-01-27 20:19:55 +03:00
|
|
|
|
|
|
|
|
|
|
|
public Collider2DCircleBehaviour() { }
|
2024-01-27 21:15:17 +03:00
|
|
|
public Collider2DCircleBehaviour(Circle circle) => CircleLocal = circle;
|
2024-01-24 19:21:53 +03:00
|
|
|
}
|