/// <summary> /// Instructs the Scene Manager to change the actual scene /// </summary> /// <param name="scene">The new Scene</param> /// <param name="transition">The transition between the actual scene and the new scene</param> /// <returns></returns> public void ChangeScene(GameScreen scene, TransitionScreen transFX) { this.NextScene = scene.Name; this.transition = transFX; this.InTransition = true; AddScene(scene); }
/// <summary> /// Adds a Scene to the Scene Manager /// </summary> /// <param name="scene">The Scene to add</param> private void AddScene(GameScreen scene) { scenesToUpdate.Add(scene.Name, scene); if (!SceneList.Contains(scene)) SceneList.Add(scene); }
public void PopUp(GameScreen scene, TransitionScreen transFX) { }
/// <summary> /// Advance to the next screen /// </summary> /// <param name="s">New Scene if there is no other to advance</param> /// <param name="t">The transition effect</param> protected void Next(GameScreen s, TransitionScreen t) { GameScreen next = s; if (sceneManager.SceneList.Count() > sceneManager.SceneList.IndexOf(this) + 1) next = sceneManager.SceneList.ElementAt(sceneManager.SceneList.IndexOf(this) + 1); sceneManager.ChangeScene(next, t); }