protected override void Initialize() { // load content first Console.WriteLine("\n[dungeontest] loading game content\n"); base.Initialize(); Console.WriteLine("\n[dungeontest] game content loaded\n"); // create main menu Console.WriteLine("\n[dungeontest] main menu loading\n"); currentScreen = new Start(); Console.WriteLine("\n[dungeontest] main menu loaded\n"); }
protected override void Update(GameTime gameTime) { // Exiting game if (currentScreen.RequestExit) Exit(); if (IsActive) {// Window has focus // Update input Input.Update(Window.ClientBounds); // Hide the mouse if it is locked to the center IsMouseVisible = !Input.lockMouse; } if (Input.Tapped(Keys.F11)) {// Pressed F11 // Fullscreen game graphics.IsFullScreen = !graphics.IsFullScreen; graphics.ApplyChanges(); } // Get the deltaTime Dungeon.deltaTime = (float)gameTime.ElapsedGameTime.TotalSeconds; // Update the screen currentScreen = currentScreen.Update(Dungeon.deltaTime); base.Update(gameTime); }