offscreen players!

This commit is contained in:
Michele 2020-11-21 23:43:34 +00:00
parent 2d14cf8059
commit ca99a1bde4
4 changed files with 159 additions and 5 deletions

View file

@ -1,3 +1,4 @@
using System.Linq;
using Microsoft.Xna.Framework;
namespace Sledgemapper
@ -14,5 +15,14 @@ namespace Sledgemapper
b3 = Sign(pt, v3, v1) < 0.0f;
return (b1 == b2) && (b2 == b3);
}
public static Color ToColor(this string s)
{
var hexs = s.TrimStart('#').Split(2).ToArray();
var color = new Color(int.Parse(hexs[0], System.Globalization.NumberStyles.HexNumber),
int.Parse(hexs[1], System.Globalization.NumberStyles.HexNumber),
int.Parse(hexs[2], System.Globalization.NumberStyles.HexNumber));
return color;
}
}
}