public MetricManager(PodManager podManager, float pixelReference, float kilometerReference, SpriteFont spriteFont, Vector2 referencePoint) { mPodManager = podManager; mPixelToKilometerConverter = pixelReference / kilometerReference; mSpriteFont = spriteFont; mTopCorner = referencePoint; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); podTexture = Content.Load <Texture2D>("LiliumJetRescaled"); formationPodTexture = Content.Load <Texture2D>("LiliumJetRescaled"); destinationTexture = Content.Load <Texture2D>("Destination"); lineTexture = Content.Load <Texture2D>("Line"); cityTexture = Content.Load <Texture2D>("City"); collabCityTexture = Content.Load <Texture2D>("CollabCity"); UKBackground = Content.Load <Texture2D>("BackgroundRescaled"); UKBackgroundRectangle = new Rectangle(0, 0, MAP_WIDTH, MAP_HEIGHT); boatBackground = Content.Load <Texture2D>("BoatBackground"); boatBackgroundRectangle = new Rectangle(0, 0, MAP_WIDTH, MAP_HEIGHT); skyBackground = Content.Load <Texture2D>("SkyBackground"); skyBackgroundRectangle = new Rectangle((int)((float)SCREEN_WIDTH * 0.75f), (int)((float)SCREEN_HEIGHT / 3), 1000, 1000); cityPodTexture = Content.Load <Texture2D>("PodWithoutWingsRecaled"); //I know this is spelt wrong I typo'ed on the image itself and its easier to just leave it backgroundPane = Content.Load <Texture2D>("BackgroundPane"); metricFont = Content.Load <SpriteFont>("Metric"); formationManager = new FormationManager(formationPodTexture, new Vector2(SCREEN_WIDTH, SCREEN_HEIGHT)); UKcityManager = new CityManager(cityTexture, MAP_WIDTH, MAP_HEIGHT); UKrouteManager = new RouteManager(destinationTexture, lineTexture, MAP_WIDTH, MAP_HEIGHT, Simulation.UK, UKcityManager); UKcityPodManager = new CityPodManager(podTexture, SCREEN_WIDTH, SCREEN_HEIGHT, new Vector2((SCREEN_WIDTH * 7) / 8, SCREEN_HEIGHT / 2), collabCityTexture, cityPodTexture); UKpodManager = new PodManager(podTexture, destinationTexture, UKrouteManager, Vector2.Zero, UKKilometerToPixelMultiplier, UKHourToSecondMultiplier, UKcityPodManager, UKcityManager); UKmetricManager = new MetricManager(UKpodManager, UKpixelReference, UKKilometerReference, metricFont, new Vector2(SCREEN_WIDTH * 0.75f, SCREEN_HEIGHT * 2 / 3)); //boatCityManager = new CityManager(cityTexture, SCREEN_WIDTH, SCREEN_HEIGHT); boatRouteManager = new RouteManager(destinationTexture, lineTexture, SCREEN_WIDTH, SCREEN_HEIGHT, Simulation.Boat); //boatCityPodManager = new CityPodManager(podTexture, SCREEN_WIDTH, SCREEN_HEIGHT, new Vector2(1050, SCREEN_HEIGHT / 2), collabCityTexture); boatPodManager = new PodManager(podTexture, destinationTexture, boatRouteManager, new Vector2(0, SCREEN_HEIGHT / 2), boatKilometerToPixelMultiplier, boatHourToSecondMultiplier); }