public static bool Collision(VideoPaintballCommon.MapObjects.MapObject mapObject1, VideoPaintballCommon.MapObjects.MapObject mapObject2) { return (!(mapObject1.Location.X > mapObject2.Location.X + mapObject2.Size.Width || mapObject1.Location.X + mapObject1.Size.Width < mapObject2.Location.X || mapObject1.Location.Y > mapObject2.Location.Y + mapObject2.Size.Height || mapObject1.Location.Y + mapObject1.Size.Height < mapObject2.Location.Y)); }
public static bool OffScreen(VideoPaintballCommon.MapObjects.MapObject mapObject) { return(mapObject.Location.X < 0 || mapObject.Location.Y < 0 || mapObject.Location.X > DimensionsUtil.GetMapWidth() || mapObject.Location.Y > DimensionsUtil.GetMapHeight()); }