public bool Contains(Vectangle other) { return(X <= other.X && Y <= other.Y && X + Width >= other.X + other.Width && Y + Height >= other.Y + other.Height); }
public bool Intersects(Vectangle other) { return(X <= other.X + other.Width && Y <= other.Y + other.Height && X + Width >= other.X && Y + Height >= other.Y); }
public static bool Intersects(this Rectangle rect, Vectangle other) { return(rect.X <= other.X + other.Width && rect.Y <= other.Y + other.Height && rect.X + rect.Width >= other.X && rect.Y + rect.Height >= other.Y); }
public static void Draw(this SpriteBatch spriteBatch, Texture2D texture, Vectangle vect, Color color) { spriteBatch.Draw(texture, vect.Origin, null, color, 0, Vector2.Zero, new Vector2(vect.Size.X / texture.Width, vect.Size.Y / texture.Height), SpriteEffects.None, 0); }