/// <summary> /// Will destroy current form and will load loading screebn /// </summary> public void DestroyCurrLoadLoading() { CamControl.ChangeTo("Game"); current.Destroy(); LoadLoadingScreen(); }
public void EscapeKey() { //means is playing //&& Program.GameFullyLoaded() is to not allow touch ESC while is loadig if (!CamControl.IsMainMenuOn() && Program.GameFullyLoaded()) { if (Program.MouseListener.IsAWindowShownNow()) { Program.MouseListener.HidePersonBuildOrderNotiBulletinHelpWin(); return; } CamControl.ChangeTo("Main"); Program.gameScene.PauseGameSpeed(); Program.MouseListener.HideMainGUI(); Program.MyScreen1.LoadMainMenuWithResumeBtn(); CamControl.CAMRTS.StopReportingAudioNow(); } //is on main Menu else if (CamControl.IsMainMenuOn() && Program.GameFullyLoaded()) { CamControl.ChangeTo("Game"); Program.gameScene.ResumeGameSpeed(); Program.MyScreen1.DestroyCurrentMenu(); Program.MouseListener.ShowMainGUI(); CamControl.CAMRTS.ReportAudioNow(); } }
/// <summary> /// Load the main menu /// </summary> public void LoadMainMenu() { current = (MyForm)General.Create(Root.mainMenu, new Vector2()); mainMenuForm = current; CamControl.ChangeTo("Main"); Debug.Log("Load Main Menu"); }
void FirstPersonCam() { if (Input.GetKeyUp(KeyCode.F10) && !isFirstCamOn) { var ini = CamControl.CAMRTS.centerTarget.transform.position; ini = new Vector3(ini.x, m.IniTerr.MathCenter.y, ini.z); firstPersonController = FirstPersonController.Create(ini); isFirstCamOn = true; CamControl.ChangeTo("First"); } else if (Input.GetKeyUp(KeyCode.F10) && isFirstCamOn) { isFirstCamOn = false; CamControl.ChangeTo("Game"); Destroy(firstPersonController.gameObject); } }