Protogame.BoundingBoxExtensions.ToRectangle C# (CSharp) Méthode

ToRectangle() public static méthode

Converts the specified Protogame bounding box to an XNA rectangle.
public static ToRectangle ( this boundingBox ) : Rectangle
boundingBox this /// The Protogame bounding box to convert. ///
Résultat Microsoft.Xna.Framework.Rectangle
        public static Rectangle ToRectangle(this IBoundingBox boundingBox)
        {
            return new Rectangle(
                (int)boundingBox.Transform.LocalPosition.X, 
                (int)boundingBox.Transform.LocalPosition.Y, 
                (int)boundingBox.Width, 
                (int)boundingBox.Height);
        }