示例#1
0
        /// <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;
        }
示例#2
0
 private void SplashScreenEvent(object sender, EventArgs e)
 {
     currentScreen = titleScreen;
     splashScreen = null;
 }
示例#3
0
 private void TitleScreenEvent(object sender, EventArgs e)
 {
     currentScreen = gameScreen;
     titleScreen = null;
 }
示例#4
0
 private void GameScreenEvent(object sender, EventArgs e)
 {
     currentScreen = nagScreen;
     gameScreen = null;
 }