void RightMission_OnClick(object sender, EventArgs e) { GameSelectedPlanets.Clear(); textSettings.Width = 700 - 28; textManager.Text = selectedMission.Description; textManager.Parse(); InternalPause = false; Manager.Enabled = false; MainMenuContract.Enabled = false; SinglePlayerContract.Enabled = true; RCS.PreCache<Texture2D>("selection_planet_ingame"); LoadMission(selectedMission); if (TutorialMode) { if (TutorialProgress == 5) { MessageBox = new MessageBox("", 700, 300, Font, RCS.GetObject<Texture2D>("Corner"), RCS.GetObject<Texture2D>("Border"), RCS.GetObject<Texture2D>("BackgroundPattern")); MessageBox.Depth = 0.1f; MessageBox.Show(false); MessageBox.Origin = new Vector2(350, 150); MessageBox.Position = new Vector2(Width / 2, Height / 2); MessageBox.Text = LocalizationData.Tutorial5; } } else MessageBox = null; GameState = GameState.Singleplayer; AI = new AIManager(); }
internal void EditorStartGame() { InternalPause = false; Manager.Enabled = false; MainMenuContract.Enabled = false; SinglePlayerContract.Enabled = true; RCS.PreCache<Texture2D>("selection_planet_ingame"); GameScript = new AtomScript(false, new Assembly[] { Assembly.GetExecutingAssembly() }); GameScript.Pause = false; AI = new AIManager(); FleetTexture1 = LevelContentManager.Load<Texture2D>("Graphics/Fleets/3"); FleetTexture2 = LevelContentManager.Load<Texture2D>("Graphics/Fleets/5"); Random rnd = new Random(); int ParalaxFolder = rnd.Next(1, 6); ParalaxLayer1 = LevelContentManager.Load<Texture2D>(string.Format("Graphics/Backgrounds/{0}/1", ParalaxFolder)); ParalaxLayer2 = LevelContentManager.Load<Texture2D>(string.Format("Graphics/Backgrounds/{0}/2", ParalaxFolder)); ParalaxLayer3 = LevelContentManager.Load<Texture2D>(string.Format("Graphics/Backgrounds/{0}/3", ParalaxFolder)); GameState = GameState.Singleplayer; }