public override void Update(GameTime gameTime) { //keyState = Keyboard.GetState(); //if (keyState.IsKeyDown(Keys.Z)) //{ // ScreenManager.Instance.AddScreen(new TitleScreen()); //} fade.Update(gameTime); if (fade.Alpha == 0.0f) { ScreenManager.Instance.AddScreen(new TitleScreen(), inputManager); } }
private void Transition(GameTime gameTime) { fade.Update(gameTime); if (fade.Alpha == 1.0f && fade.Timer.TotalSeconds == 1.0f) { screenStack.Push(newScreen); currentScreen.UnloadContent(); currentScreen = newScreen; currentScreen.LoadContent(content, inputManager); } else if (fade.Alpha == 0.0f) { transition = false; fade.IsActive = false; } }