/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Development Version 1.0.3 // Create a new SpriteBatch for Drawing All Textures and a Font for Highscores // Requirements 4.3.7, 10.2.6, 11.1.0 and 13.3.0 spriteBatch = new SpriteBatch(GraphicsDevice); font = Content.Load<SpriteFont>("HighscoresFont"); // Development Version 1.0.3 // Set Preferred Screen Ratio/Size // Requirement 4.0.0 graphics.PreferredBackBufferWidth = screenWidth; graphics.PreferredBackBufferHeight = screenHeight; graphics.ApplyChanges(); //commit above screen changes IsMouseVisible = true; //set mouse visible // Development Version 2.0.0 // Load Menu Content // Requirements 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4 and 4.3.6 loadMainMenu(); loadHighScoreMenu(); loadHelpMenu(); loadCustomizeMenu(); backButton = new mButton(Content.Load<Texture2D>("Buttons/BackButton"), graphics.GraphicsDevice); backButton.setSize(new Vector2(54, 24)); //image size is 54x24 pixels, size is halved backButton.setPosition(new Vector2(25, 25)); // Development Version 2.0.4 // Add Menu Selection and Zombie Sound Effects to Menus // Requirements 7.6.0, 7.6.1 and 7.6.2 menuSelection = Content.Load<SoundEffect>("Sound/Selection"); zombieSelection = Content.Load<SoundEffect>("Sound/ZombieSound1"); // Development Version 3.0.2 // Create Level System // Requirement 5.8.0 levelSystem = new Level(graphics, Services, spriteBatch, this); }
// Development Version 1.0.2 // Reset Game // Requirement 16.0.0 public void resetGame() { currentGameState = GameState.MainMenu; level = 0; // Set level back to 0 levelSystem = new Level(graphics, Services, spriteBatch, this);// Create level system }