Syntriax.Engine/Engine.Physics2D/Collider2DCircleBehaviour.cs

15 lines
495 B
C#
Raw Normal View History

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