2024-01-25 18:52:47 +03:00
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
|
|
|
|
using Apos.Shapes;
|
|
|
|
|
|
|
|
using Syntriax.Engine.Physics2D.Primitives;
|
|
|
|
|
|
|
|
namespace Pong.Behaviours;
|
|
|
|
|
|
|
|
public class CircleBehaviour : Syntriax.Engine.Physics2D.Collider2DCircleBehaviour, IDisplayableShape
|
|
|
|
{
|
2024-01-27 22:45:49 +03:00
|
|
|
public CircleBehaviour(Circle circle) : base(circle) { }
|
|
|
|
public CircleBehaviour(Circle circle, float thickness) : base(circle) { Thickness = thickness; }
|
|
|
|
public CircleBehaviour(Circle circle, Color color) : base(circle) { Color = color; }
|
|
|
|
public CircleBehaviour(Circle circle, Color color, float thickness) : base(circle) { Thickness = thickness; Color = color; }
|
2024-01-25 18:52:47 +03:00
|
|
|
|
|
|
|
public Color Color { get; set; } = Color.White;
|
|
|
|
public float Thickness { get; set; } = .5f;
|
|
|
|
|
|
|
|
public void Draw(ShapeBatch shapeBatch)
|
|
|
|
{
|
2024-01-27 21:50:28 +03:00
|
|
|
Recalculate();
|
|
|
|
|
2024-01-25 18:52:47 +03:00
|
|
|
shapeBatch.BorderCircle(CircleWorld.Center.ToDisplayVector2(), CircleWorld.Radius, Color);
|
|
|
|
}
|
|
|
|
}
|