예제 #1
0
        /*   public void TestGame(object sender, EventArgs e)
         * {
         *     OnTransitionOut();
         *     ScreenManager.GetInstance().Game.IsMouseVisible = true;
         *
         *     ScreenManager.GetInstance().Screens.Clear();
         *
         *     ScreenManager.GetInstance().addScreen(new LoadingScreen());
         *
         *  //   GameManager g = new GameManager(content, graphics, ScreenManager);
         *
         * //    ScreenManager.addScreen(g);
         *  //   ScreenManager.addScreen(new GameplayScreen(content, graphics, ScreenManager));
         *     ScreenManager.GetInstance().addScreen(new SimulationScreen());
         *
         * }*/

        public void OptionMenu(MenuElement element)
        {
            OnTransitionOut();
            ScreenManager.GetInstance().Game.IsMouseVisible = true;
            //ScreenManager.Screens.Clear();

            isVisible = false;
            hasFocus  = false;

            OptionsScreen options = new OptionsScreen();

            options.ExitMenu += ExitMenu;

            ScreenManager.GetInstance().addScreen(options);
        }
예제 #2
0
        /*    public void PlayGame(object sender, EventArgs e)
         *  {
         *      ScreenManager.Game.IsMouseVisible = true;
         *      ScreenManager.removeScreen(this);
         *      foreach (GameScreen screen in screenManager.Screens)
         *      {
         *          if (screen is GameplayScreen)
         *          {
         *              screen.HasFocus = true;
         *          }
         *      }
         *  }*/
        public void OptionMenu(MenuElement element)
        {
            OnTransitionOut();
            ScreenManager.GetInstance().Game.IsMouseVisible = true;
            //ScreenManager.Screens.Clear();

            for (int i = 0; i < ScreenManager.GetInstance().Screens.Count; i++)
            {
                //NOTE: Will need to change this, as currently exiting the options menu will set ALL screens in screenManager
                //to visible and hasFocus, not just the ones that were in that state before entering the options menu
                ScreenManager.GetInstance().Screens[i].IsVisible = false;
                ScreenManager.GetInstance().Screens[i].HasFocus  = false;
            }
            ScreenManager.GetInstance().addScreen(new BackgroundScreen());
            OptionsScreen options = new OptionsScreen();

            options.ExitMenu += ExitMenu;
            ScreenManager.GetInstance().addScreen(options);
        }