public override void Initialize()
        {
            base.Initialize();

            MenuScreen         = new MenuScreen(Game);
            SplashScreen       = new SplashScreen(Game);
            GameScreen         = new GameScreen(Game);
            CreditsScreen      = new CreditsScreen(Game);
            StoryScreen        = new StoryScreen(Game);
            LeaderboardScreen  = new LeaderboardScreen(Game);
            ParallaxBackground = new ParallaxBackground(Game);

            MenuScreen.Initialize();
            CreditsScreen.Initialize();
            SplashScreen.Initialize();
            StoryScreen.Initialize();
            LeaderboardScreen.Initialize();
            ParallaxBackground.Initialize();

            Screens = new List <Screen>();

            Screens.Add(ParallaxBackground);
            Screens.Add(MenuScreen);
            Screens.Add(LeaderboardScreen);
            Screens.Add(CreditsScreen);
            Screens.Add(StoryScreen);
            Screens.Add(GameScreen);
            Screens.Add(SplashScreen);

            MenuScreen.Show(false);
            GameScreen.Show(false);
            CreditsScreen.Show(false);
            StoryScreen.Show(false);
            LeaderboardScreen.Show(false);
        }
Example #2
0
 public Game1()
 {
     menuScreen = new MenuScreen(this);
     splashScreen = new SplashScreen(this);
     gameScreen = new GameScreen(this);
     creditsScreen = new CreditsScreen(this);
     storyScreen = new StoryScreen(this);
     graphics = new GraphicsDeviceManager(this);
     graphics.PreferredBackBufferHeight = SCREEN_HEIGHT;
     graphics.PreferredBackBufferWidth = SCREEN_WIDTH;
 }