Mirror of Svelto.ECS because we're a fan of it
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.

ECSVector2.cs 645B

1234567891011121314151617181920
  1. namespace Svelto.ECS.Components
  2. {
  3. public struct ECSVector2
  4. {
  5. public float x, y;
  6. public static readonly ECSVector2 right = new ECSVector2(1f, 0f);
  7. public static readonly ECSVector2 left = new ECSVector2(-1f, 0f);
  8. public static readonly ECSVector2 down = new ECSVector2(0f, -1f);
  9. public static readonly ECSVector2 up = new ECSVector2(0f, 1f);
  10. public static readonly ECSVector2 one = new ECSVector2(1f, 1f);
  11. public static readonly ECSVector2 zero = new ECSVector2(0f, 0f);
  12. public ECSVector2(float X, float Y)
  13. {
  14. x = X;
  15. y = Y;
  16. }
  17. }
  18. }