/// <summary> /// Gets the coordinates for the texture acording to its rotation and flip. /// </summary> /// <remarks>The return values are stored 0->BottonLeft; 1->BottonRight; 2->TopRight; 3->TopLeft</remarks> /// <param name="tileID">The ID of the texture.</param> /// <param name="rotation">The rotation to aply to the texture.</param> /// <param name="flip">If the Texture must be fliped.</param> /// <param name="position">The position of the texture inside the 64px texture.</param> /// <param name="vertical">Is a vertical Rectangle.</param> /// <returns>A array with 4 positions where each position represent one of the vertices od the texture, it will be a rectangle 64pxX24px.</returns> public Vector2[] GetRectangleTexture(UInt32 tileID, RotationType rotation, Boolean flip, RectangleTexturePosition position) { Vector2[] texture = GetNormalTexture(tileID, rotation, flip); switch (position) { case RectangleTexturePosition.Botton: return bottomRectangle(texture, rotation); case RectangleTexturePosition.Top: return topRectangle(texture, rotation); case RectangleTexturePosition.CenterHorizontal: break; case RectangleTexturePosition.Left: return leftRectangle(texture, rotation); case RectangleTexturePosition.Right: return rightRectangle(texture, rotation); } throw new NotImplementedException(); }
/// <summary> /// Gets the coordinates for the texture acording to its rotation and flip. /// </summary> /// <remarks>The return values are stored 0->BottonLeft; 1->BottonRight; 2->TopRight; 3->TopLeft</remarks> /// <param name="tileID">The ID of the texture.</param> /// <param name="rotation">The rotation to aply to the texture.</param> /// <param name="flip">If the Texture must be fliped.</param> /// <param name="position">The position of the texture inside the 64px texture.</param> /// <param name="vertical">Is a vertical Rectangle.</param> /// <returns>A array with 4 positions where each position represent one of the vertices od the texture, it will be a rectangle 64pxX24px.</returns> public Vector2[] GetRectangleTexture(UInt32 tileID, RotationType rotation, Boolean flip, RectangleTexturePosition position) { Vector2[] texture = GetNormalTexture(tileID, rotation, flip); switch (position) { case RectangleTexturePosition.Botton: return(bottomRectangle(texture, rotation)); case RectangleTexturePosition.Top: return(topRectangle(texture, rotation)); case RectangleTexturePosition.CenterHorizontal: break; case RectangleTexturePosition.Left: return(leftRectangle(texture, rotation)); case RectangleTexturePosition.Right: return(rightRectangle(texture, rotation)); } throw new NotImplementedException(); }