2020-01-05 07:17:29 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Numerics;
|
|
|
|
|
|
|
|
|
|
namespace MoonTools.Core.Bonk
|
|
|
|
|
{
|
2020-01-06 05:36:31 +00:00
|
|
|
|
public struct SweepResult<T> where T : IEquatable<T>
|
2020-01-05 07:17:29 +00:00
|
|
|
|
{
|
2020-01-06 05:36:31 +00:00
|
|
|
|
public static SweepResult<T> False = new SweepResult<T>();
|
2020-01-05 07:17:29 +00:00
|
|
|
|
|
|
|
|
|
public bool Hit { get; }
|
|
|
|
|
public Vector2 Motion { get; }
|
|
|
|
|
public T ID { get; }
|
|
|
|
|
|
2020-01-06 05:36:31 +00:00
|
|
|
|
public SweepResult(bool hit, Vector2 motion, T id)
|
2020-01-05 07:17:29 +00:00
|
|
|
|
{
|
|
|
|
|
Hit = hit;
|
|
|
|
|
Motion = motion;
|
|
|
|
|
ID = id;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|