protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // TODO: use this.Content to load your game content here courierNew = Content.Load<SpriteFont>(@"Fonts\CourierNew"); courierNewBig = Content.Load<SpriteFont>(@"Fonts\CourierNewBig"); courierNewBiger = Content.Load<SpriteFont>(@"Fonts\CourierNewBiger"); liveIcon = Content.Load<Texture2D>(@"Sprites/shipIconSmaller"); healthBar = Content.Load<Texture2D>(@"Sprites/healthBar"); myBackground = new ScrollingBackground(); blood = Content.Load<Texture2D>(@"Sprites/healthBar1"); flag = Content.Load<Texture2D>(@"Sprites/flag"); Texture2D background11 = Content.Load<Texture2D>(@"Sprites/bg11"); Texture2D background12 = Content.Load<Texture2D>(@"Sprites/bg12"); Texture2D background13 = Content.Load<Texture2D>(@"Sprites/bg13"); Texture2D background21 = Content.Load<Texture2D>(@"Sprites/bg21"); Texture2D background22 = Content.Load<Texture2D>(@"Sprites/bg22"); Texture2D background23 = Content.Load<Texture2D>(@"Sprites/bg23"); Texture2D background31 = Content.Load<Texture2D>(@"Sprites/bg31"); Texture2D background32 = Content.Load<Texture2D>(@"Sprites/bg32"); Texture2D background33 = Content.Load<Texture2D>(@"Sprites/bg33"); myBackground.Load(GraphicsDevice, background11, background12, background13, background21, background22, background23, background31, background32, background33); }
protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // TODO: use this.Content to load your game content here courierNew = Content.Load<SpriteFont>(@"Fonts\CourierNew"); courierNewBig = Content.Load<SpriteFont>(@"Fonts\CourierNewBig"); liveIcon = Content.Load<Texture2D>(@"Sprites/shipIconSmaller"); healthBar = Content.Load<Texture2D>(@"Sprites/healthBar"); myBackground = new ScrollingBackground(); Texture2D background = Content.Load<Texture2D>(@"Sprites/background"); myBackground.Load(GraphicsDevice, background); }