An instance of a pause menu. This will support the options to resume the game, go to the title sceen, and quit the game.
Inheritance: Menu
Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PauseScreen"/> class.
        /// </summary>
        public PauseScreen()
            : base()
        {
            Game1.screens.IsPaused = true;
            Game1.screens.IsTitle = false;
            Game1.screens.IsSettings = false;
            // Note: Do not use GameClock, it will be paused!
            this.initialTime = DateTime.Now.Ticks;
            this.menu = new PauseMenu(new Vector2(300, 100), 50, "Resume");

            this.textDrawPosition = new Vector2(300, 50);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PreLevelScreen"/> class.
 /// </summary>
 public PreLevelScreen()
     : base()
 {
     Game1.screens.IsTitle = false;
     Game1.screens.IsPaused = false;
     this.menu = new PauseMenu(new Vector2(260, 200), 50, "Start Level " + (Game1.CurrentLevel.LevelNumber + 1));
     // Note: Do not use GameClock, it will be paused!
     //this.initialTime = DateTime.Now.Ticks;
     //duration = 50000000;
     textDrawPosition = new Vector2(210, 100);
     textDrawPositionScore = new Vector2(260, 140);
 }