Engine-Pong/Game/Behaviours/CircleBehaviour.cs

24 lines
926 B
C#
Raw Normal View History

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
{
public CircleBehaviour(Circle circle) { this.CircleLocal = circle; }
public CircleBehaviour(Circle circle, float Thickness) { this.CircleLocal = circle; this.Thickness = Thickness; }
public CircleBehaviour(Circle circle, Color color) { this.CircleLocal = circle; Color = color; }
public CircleBehaviour(Circle circle, Color color, float Thickness) { this.CircleLocal = circle; this.Thickness = Thickness; Color = color; }
public Color Color { get; set; } = Color.White;
public float Thickness { get; set; } = .5f;
public void Draw(ShapeBatch shapeBatch)
{
shapeBatch.BorderCircle(CircleWorld.Center.ToDisplayVector2(), CircleWorld.Radius, Color);
}
}