public EditorScene() : base("Editeur") { Simulator = new Simulator(this, Main.LevelsFactory.GetEmptyDescriptor()) { EditorMode = true }; Simulator.Initialize(); Inputs.AddListener(Simulator); Simulator.EnableInputs = false; }
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"; }
public MainMenuScene() : base("Menu") { Title = new CommanderTitle(this, new Vector3(0, -10, 0), VisualPriorities.Default.Title); Title.Initialize(); LevelDescriptor levelDescriptor = Main.LevelsFactory.Menu; Simulator = new Simulator(this, levelDescriptor) { DemoMode = true, EnableInputs = false }; Simulator.Initialize(); Main.NewsController.LoadNewsAsync(NewsType.General); Inputs.AddListener(Simulator); SceneState = State.Transition; Choices = new MainMenuChoices(Simulator, VisualPriorities.Default.MenuChoices); }
public void Initialize() { // Initialize the simulator Simulator = new Simulator(this, Main.LevelsFactory.GetLevelDescriptor(Descriptor.Layout)) { DemoMode = true, WorldMode = true, AvailableLevelsDemoMode = LevelsDescriptors }; Simulator.Initialize(); Inputs.AddListener(Simulator); Simulator.EnableInputs = false; Simulator.HelpBar.Fade(Simulator.HelpBar.Alpha, 255, 500); // Initialize the descriptions of each level (name, difficulty, highscore, etc.) foreach (var level in Descriptor.Levels) { LevelDescriptor d = Main.LevelsFactory.GetLevelDescriptor(level.Key); LevelsDescriptors.Add(d.Infos.Mission, d); } foreach (var level in Descriptor.Warps) { LevelDescriptor d = Main.LevelsFactory.GetLevelDescriptor(level.Key); LevelsDescriptors.Add(d.Infos.Mission, d); Warps.Add(d.Infos.Mission, level.Value); } // Keep track of celestial bodies and pink holes InitializeCelestialBodies(); LevelStates.CelestialBodies = CelestialBodies; LevelStates.Descriptor = Descriptor; LevelStates.LevelsDescriptors = LevelsDescriptors; LevelStates.Initialize(); Main.CheatsController.CheatActivated += new StringHandler(DoCheatActivated); }
public SimulatorAnimation(CommanderScene scene) { Scene = scene; Background = new Image("PixelBlanc") { Color = Color.White, Size = Preferences.BackBuffer, VisualPriority = VisualPriorities.Cutscenes.IntroSimulatorBackground }; TimeBeforeIn = IntroCutscene.Timing["SimulatorIn"]; Simulator = new Simulator(scene, Main.LevelsFactory.CutsceneDescriptors[1]) { DemoMode = true, CutsceneMode = true }; Simulator.Initialize(); Scene.VisualEffects.Add(Background, VisualEffects.Fade(Background.Alpha, 0, 0, 4000)); //Scene.VisualEffects.Add(Background, Core.Visual.VisualEffects.ChangeColor(Color.Transparent, 0, 2000)); //Scene.VisualEffects.Add(Background, Core.Visual.VisualEffects.FadeOutTo0(255, TimeBeforeIn, 5000)); }