Beispiel #1
0
        public GameOverPopup(ScreenBase owner)
        {
            this.owner = owner;

            var padding = 100;

            drawRectangle = new Rectangle(
                padding,
                padding,
                Game.Window.ClientBounds.Width - padding * 2,
                Game.Window.ClientBounds.Height - padding * 2);
        }
Beispiel #2
0
        public ScreenManager()
        {
            startScreen = new StartScreen();
            actionScreen = new ActionScreen();

            screens = new List<ScreenBase>();
            screens.Add(startScreen);
            screens.Add(actionScreen);

            //activeScreen = startScreen;
            activeScreen = actionScreen;
        }
Beispiel #3
0
 public void Navigate(Screen screen)
 {
     activeScreen.Hide();
     switch (screen)
     {
         case Screen.Game:
             activeScreen = actionScreen;
             break;
         case Screen.Start:
             activeScreen = startScreen;
             break;
     }
     activeScreen.Show();
 }