protected override void LoadContent(ContentManager theContentManager, GraphicsDevice theGraphicsDevice) { mPShipSprite = new PShip(); mProjectileSprite = new Projectile(); //Initialize and add the background images to the Scrolling background. You can change the //scroll area by passing in a different Viewport. The images will then scale and scroll within //that given Viewport. mScrollingBackground = new VerticallyScrollingBackground(theGraphicsDevice.Viewport); mScrollingBackground.AddBackground("Background1"); mScrollingBackground.AddBackground("Background2"); mScrollingBackground.AddBackground("Background3"); mScrollingBackground.AddBackground("Background4"); mScrollingBackground.AddBackground("Background5"); mScrollingBackground.AddBackground("Background6"); mScrollingBackground.AddBackground("Background7"); mScrollingBackground.AddBackground("Background8"); mScrollingBackground.AddBackground("Background9"); //Load the content for the Scrolling background mScrollingBackground.LoadContent(theContentManager); mProjectileSprite.LoadContent(theContentManager); mPShipSprite.LoadContent(theContentManager); }
protected override void LoadContent(ContentManager theContentManager, GraphicsDevice theGraphicsDevice) { mPShipSprite = new PShip(); mProjectileSprite = new Projectile(); //Initialize and add the background images to the Scrolling background. You can change the //scroll area by passing in a different Viewport. The images will then scale and scroll within //that given Viewport. mScrollingBackground = new VerticallyScrollingBackground(theGraphicsDevice.Viewport); mScrollingBackground.AddBackground("Background1"); mScrollingBackground.AddBackground("Background2"); mScrollingBackground.AddBackground("Background3"); mScrollingBackground.AddBackground("Background4"); mScrollingBackground.AddBackground("Background5"); mScrollingBackground.AddBackground("Background6"); mScrollingBackground.AddBackground("Background7"); mScrollingBackground.AddBackground("Background8"); mScrollingBackground.AddBackground("Background9"); //Load the content for the Scrolling background mScrollingBackground.LoadContent(theContentManager); mProjectileSprite.LoadContent(theContentManager); mPShipSprite.LoadContent(theContentManager); }