Ejemplo n.º 1
0
        public GameScene(string name, LevelDescriptor level)
            : base(name)
        {
            Level = level;

            TransitingTo = "";

            Simulator = new Simulator(this, level);
            Simulator.Initialize();
            Simulator.AddNewGameStateListener(DoNewGameState);
            Inputs.AddListener(Simulator);

            FutureJobs = new FutureJobsController();

            MusicName = "Raindrop";
        }
Ejemplo n.º 2
0
        private void TransiteToNewGame(LevelDescriptor level)
        {
            Main.MusicController.StopCurrentMusic();

            var newGame = new GameScene(Name == "Game1" ? "Game2" : "Game1", level);
            Main.GameInProgress = newGame;
            newGame.Simulator.AddNewGameStateListener(Main.SelectedWorld.DoNewGameState);

            if (Visuals.GetScene(newGame.Name) == null)
                Visuals.AddScene(newGame);
            else
                Visuals.UpdateScene(newGame.Name, newGame);

            TransitingTo = newGame.Name;
            TransiteTo(TransitingTo);
        }