A stealth-based 2D platformer where you don't have to kill anyone unless you want to. https://www.semicolin.games
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
576 B

  1. using Microsoft.Xna.Framework;
  2. // All extension methods on built-in types (of C# or MonoGame) go in this file.
  3. namespace SemiColinGames {
  4. static class ExtensionMethods {
  5. // Vector2
  6. public static Vector2 Rotate(this Vector2 point, float angle) {
  7. float cos = FMath.Cos(angle);
  8. float sin = FMath.Sin(angle);
  9. return new Vector2(
  10. point.X * cos - point.Y * sin,
  11. point.Y * cos + point.X * sin);
  12. }
  13. // Point
  14. public static void Deconstruct(this Point point, out int x, out int y) =>
  15. (x, y) = (point.X, point.Y);
  16. }
  17. }