public void Push(Scene nextScene) { sceneList.AddLast(nextScene); nextScene.Initialize(); nextScene.LayoutComponents(); nextScene.Activated(); }
public GameLogic Generate(GameBase game, Scene scene, double textureScale) { var args = new object[] { game, scene, textureScale }; var sum = 0; foreach (var specialInfo in infos) { sum += specialInfo.weight; } var threshold = sum * random.NextDouble(); foreach (var specialInfo in infos) { threshold -= specialInfo.weight; if (threshold <= 0) { return CreateGameLogic(specialInfo, args); } } return CreateGameLogic(infos[0], args); }
public void Swap(Scene nextScene, bool runGC = false) { Pop(); Push(nextScene); }
public Scene GetParent(Scene scene) { return sceneList.FindLast(scene).Previous.Value; }
public BlackoutSwitchScene(GameBase game, Scene next) : base(game) { this.next = next; elapsed = 0; }