/// <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); // TODO: use this.Content to load your game content here spriteFont = Content.Load<SpriteFont>("SpriteFont1"); splashScreen = new SplashScreen(new EventHandler(SplashScreenEvent), spriteFont, GraphicsDevice); titleScreen = new TitleScreen(new EventHandler(TitleScreenEvent), spriteFont, GraphicsDevice ); gameScreen = new GameScreen(new EventHandler(GameScreenEvent), spriteFont, GraphicsDevice ); nagScreen = new NagScreen(new EventHandler(NagScreenEvent), spriteFont, GraphicsDevice); currentScreen = splashScreen; }
private void SplashScreenEvent(object sender, EventArgs e) { currentScreen = titleScreen; splashScreen = null; }
private void TitleScreenEvent(object sender, EventArgs e) { currentScreen = gameScreen; titleScreen = null; }
private void GameScreenEvent(object sender, EventArgs e) { currentScreen = nagScreen; gameScreen = null; }