diff options
Diffstat (limited to 'RayRoom/Core/Line.cs')
-rw-r--r-- | RayRoom/Core/Line.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/RayRoom/Core/Line.cs b/RayRoom/Core/Line.cs new file mode 100644 index 0000000..84d82fe --- /dev/null +++ b/RayRoom/Core/Line.cs @@ -0,0 +1,21 @@ +using System.Numerics; + +namespace RayRoom.Core +{ + public class Line : IStructure + { + public readonly Vector2 a; + public readonly Vector2 b; + + public Line(Vector2 a, Vector2 b) + { + this.a = a; + this.b = b; + } + + public bool CastRay(Ray ray, out CastInfo info) + { + return CollisionHelpers.RaycastRayToLine(this, ray, out info); + } + } +} |