Пример #1
0
        public static Vector2 toSpriteBatchCoords(Utilities.Vector2D vector2d, Viewport Viewport)
        {
            Vector2 position;

            position.X = (vector2d.X + Viewport.AspectRatio / 2) * Viewport.Width / Viewport.AspectRatio;
            position.Y = Viewport.Height - ((vector2d.Y + 0.5f) * Viewport.Height);
            return(position);
        }
Пример #2
0
 public static Vector2 toVector2(Utilities.Vector2D vector2d)
 {
     return(new Vector2((float)vector2d.X, (float)vector2d.Y));
 }
Пример #3
0
 // Game Logic is 2D
 public static Vector3 toVector3(Utilities.Vector2D vector2d)
 {
     return(new Vector3((float)vector2d.X, (float)vector2d.Y, 0.0f));
 }