Syntriax.Engine/Engine.Physics2D/Collider2DCircleBehaviour.cs

15 lines
495 B
C#

using Syntriax.Engine.Core;
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; } = new(Vector2D.Zero, 1f);
public Circle CircleLocal { get; set; } = new(Vector2D.Zero, 1f);
public override void CalculateCollider() => CircleWorld = Transform.TransformCircle(CircleLocal);
}