protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(_graphics.GraphicsDevice); Services.AddService(typeof(SpriteBatch), _spriteBatch); _audio = new AudioLibrary(); _audio.LoadContent(this.Content); Services.AddService(typeof(AudioLibrary), _audio); helpBackgroundTexture = Content.Load<Texture2D>("helpbackground"); helpForegroundTexture = Content.Load<Texture2D>("helpforeground"); _helpScene = new HelpScene(this, helpBackgroundTexture, helpForegroundTexture); Components.Add(_helpScene); // Create the Start scene smallFont = Content.Load<SpriteFont>("menuSmall"); largeFont = Content.Load<SpriteFont>("menuLarge"); startBackgroundTexture = Content.Load<Texture2D>("startBackground"); startElementsTexture = Content.Load<Texture2D>("startSceneElements"); _startScene = new StartScene(this, smallFont, largeFont, startBackgroundTexture, startElementsTexture); Components.Add(_startScene); _creditScene = new CreditScene(this, smallFont, largeFont, startBackgroundTexture, startElementsTexture); Components.Add(_creditScene); actionElementsTexture = Content.Load<Texture2D>("rockrainenhanced"); actionBackgroundTexture = Content.Load<Texture2D>("spacebackground"); scoreFont = Content.Load<SpriteFont>("score"); scoreFont = Content.Load<SpriteFont>("score"); //_actionScene = new ActionScene(this, actionElementsTexture, actionBackgroundTexture, _scoreFont); //Components.Add(_actionScene); _joinScene = new JoinScene(this, largeFont, menuControllers); Components.Add(_joinScene); _startScene.Show(); _activeScene = _startScene; }
/// <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); Services.AddService(typeof(SpriteBatch), spriteBatch); // Load audio elements audio = new AudioLibrary(); audio.LoadContent(Content); Services.AddService(typeof(AudioLibrary), audio); // Create help screens helpBackgroundTexture = Content.Load<Texture2D>("helpbackground"); helpForegroundTexture = Content.Load<Texture2D>("helpforeground"); helpScene = new HelpScene(this, helpBackgroundTexture, helpForegroundTexture); Components.Add(helpScene); // Create the Start Scene smallFont = Content.Load<SpriteFont>("menuSmall"); largeFont = Content.Load<SpriteFont>("menuLarge"); startBackgroundTexture = Content.Load<Texture2D>("startbackground"); startElementsTexture = Content.Load<Texture2D>("startSceneElements"); startScene = new StartScene(this, smallFont, largeFont, startBackgroundTexture, startElementsTexture); Components.Add(startScene); // Create the Action Scene scoreFont = Content.Load<SpriteFont>("score"); actionElementsTexture = Content.Load<Texture2D>("rockrainenhanced"); actionBackgroundTexture = Content.Load<Texture2D>("SpaceBackground"); actionScene = new ActionScene(this, actionElementsTexture, actionBackgroundTexture, scoreFont); Components.Add(actionScene); // Starts the game startScene.Show(); activeScene = startScene; }