// Open box for starting a new game public void OpenGameInit(GameInitBox.GameType gameType = GameInitBox.GameType.Custom) { // the following code will start the intro mission that is played in the background while the GameInitBox is active GameManager.Instance.StartGame(GameInfo.GetIntroMission(), RenderView, AudioInterface); ClosePopup(); RenderView.ResetZoom(); if (initBox == null) { initBox = new GameInitBox(this, gameType); AddChild(initBox, 0, 0); } initBox.Displayed = true; initBox.Enabled = true; PanelBar.Displayed = false; PanelBar.Enabled = false; if (Viewport != null) { Viewport.Enabled = false; } Layout(); }
public void CloseGameInit() { ClosePopup(); PopupBox = null; if (initBox != null) { initBox.Displayed = false; DeleteChild(initBox); initBox = null; } PanelBar.Displayed = true; PanelBar.Enabled = true; Viewport.Enabled = true; Layout(); UpdateMapCursorPosition(mapCursorPosition); }