Syntriax.Engine/Engine.Physics2D/Collider2DCircleBehaviour.cs

18 lines
579 B
C#
Raw Normal View History

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
{
public Circle CircleWorld { get; protected set; } = Circle.UnitCircle;
public Circle CircleLocal { get; set; } = Circle.UnitCircle;
2024-01-24 19:21:53 +03:00
public override void CalculateCollider() => CircleWorld = Transform.TransformCircle(CircleLocal);
public Collider2DCircleBehaviour() { }
public Collider2DCircleBehaviour(Circle circle) => CircleLocal = circle;
2024-01-24 19:21:53 +03:00
}