18 lines
579 B
C#
18 lines
579 B
C#
using Syntriax.Engine.Physics2D.Abstract;
|
|
using Syntriax.Engine.Physics2D.Primitives;
|
|
|
|
namespace Syntriax.Engine.Physics2D;
|
|
|
|
public class Collider2DCircleBehaviour : Collider2DBehaviourBase, ICircleCollider2D
|
|
{
|
|
public Circle CircleWorld { get; protected set; } = Circle.UnitCircle;
|
|
public Circle CircleLocal { get; set; } = Circle.UnitCircle;
|
|
|
|
|
|
public override void CalculateCollider() => CircleWorld = Transform.TransformCircle(CircleLocal);
|
|
|
|
|
|
public Collider2DCircleBehaviour() { }
|
|
public Collider2DCircleBehaviour(Circle circle) => CircleLocal = circle;
|
|
}
|