2024-01-24 19:21:53 +03:00
|
|
|
using Syntriax.Engine.Core;
|
|
|
|
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; } = new(Vector2D.Zero, 1f);
|
|
|
|
public Circle CircleLocal { get; set; } = new(Vector2D.Zero, 1f);
|
|
|
|
|
|
|
|
|
2024-01-25 22:00:49 +03:00
|
|
|
public override void CalculateCollider() => CircleWorld = Transform.TransformCircle(CircleLocal);
|
2024-01-24 19:21:53 +03:00
|
|
|
}
|