Watch
2
0
Fork
You've already forked raylib-cs
0
raylib-cs/Raylib-cs/types/Circle.cs
Matorio d723905f5c Extensions and explicit types
Added a new "RaylibExtensions" static class that gives overloaded extension methods to types so you can use them directly instead of calling the raylib class for everything.

Two new types: "Circle" and "Line"

All the "var" variables were changed to explicit types on the raylib class.

"MakeDirectory" overload, and string version of "GetApplicationDirectory" and "GetWorkingDirectory" methods.
2025-06-20 18:41:16 -05:00

69 lines
1.2 KiB
C#

using System.Numerics;
namespace Raylib_cs;
public struct Circle
{
public Vector2 position;
public float radius;
public Color color;
public float X
{
get
{
return position.X;
}
set
{
position.Y = value;
}
}
public float Y
{
get
{
return position.Y;
}
set
{
position.Y = value;
}
}
public Circle(Vector2 position)
{
this.position = position;
}
public Circle(float x, float y)
{
position = new Vector2(x, y);
}
public Circle(float x, float y, Color color)
{
position = new Vector2(x, y);
this.color = color;
}
public Circle(Vector2 position, float radius)
{
this.position = position;
this.radius = radius;
}
public Circle(float x, float y, float radius)
{
position = new Vector2(x, y);
this.radius = radius;
}
public Circle(Vector2 position, float radius, Color color)
{
this.position = position;
this.radius = radius;
this.color = color;
}
}