public static Obstacle CreateObstacle(PhysicalScene scene) { var obstacleTexture = BounceGame.ContentManager.Load<Texture2D>("obstacle"); var o = new Obstacle(scene, obstacleTexture); return o; }
private static bool doesObstacleIntersect(Obstacle o, List<Rectangle> rectangleList) { foreach (Rectangle rectangleToTest in rectangleList) { rectangleToTest.Inflate(10, 25); if (o.Rectangle.Intersects(rectangleToTest)) return true; } return false; }