private SceneManager() { TypeOfSceneSaves = SceneSavesType.Load; _currentScene = new SceneMap(); }
private void UpdateTransition(GameTime gameTime) { var dt = gameTime.ElapsedGameTime.TotalMilliseconds; if (_beginTransitionFade) { if (_transitionImage.Alpha < 1.0f) _transitionImage.Alpha += 0.1f; else _beginTransitionFade = false; } else { if (_newScene != null) { _currentScene.UnloadContent(); _currentScene = _newScene; _currentScene.LoadContent(); _newScene = null; } if (_transitionImage.Alpha > 0.0f) _transitionImage.Alpha -= 0.1f; else { _transitionImage.IsVisible = false; _isTransitioning = false; } } }