/// <summary> /// Overridden from the base Game.Initialize. Once the GraphicsDevice is setup, /// we'll use the viewport to initialize some values. /// </summary> protected override void Initialize() { State = GameState.Menu; wallHeight = Math.Min(GraphicsDevice.Viewport.Height, MaxWallheight); bottomGroundRect = new Rectangle(0, wallHeight + 1, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height - MaxWallheight); player = new Player(); ground = new ParallaxingBackground(); buildings = new ParallaxingBackground(); bushes = new ParallaxingBackground(); clouds1 = new ParallaxingBackground(); clouds2 = new ParallaxingBackground(); base.Initialize(); }
/// <summary> /// Overridden from the base Game.Initialize. Once the GraphicsDevice is setup, /// we'll use the viewport to initialize some values. /// </summary> protected override void Initialize() { State = GameState.Menu; wallHeight = Math.Min (GraphicsDevice.Viewport.Height, MaxWallheight); bottomGroundRect = new Rectangle (0, wallHeight + 1, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height - MaxWallheight); player = new Player (); ground = new ParallaxingBackground (); buildings = new ParallaxingBackground (); bushes = new ParallaxingBackground (); clouds1 = new ParallaxingBackground (); clouds2 = new ParallaxingBackground (); base.Initialize (); }