// --- Hides the Level Select --- public void hideMenu() { LoadingScreenUI.SetActive(true); mainMenuPanel.SetActive(false); ResetButton.SetActive(true); LoadingScreenUI.SetActive(false); }
public void StartDemoWithRecallMode() { if (!CheckValidSeed()) { return; } InteractablePathManager.SeedString = seedInputField.text; string sceneName = selectedDemo.sceneName; LoadingScreenUI.LoadRecall(sceneName, true); }
public void hideWinBox() { LoadingScreenUI.SetActive(true); clearLevel(); winBoxUI.SetActive(false); mainMenuPanel.SetActive(true); levelButtons[levelUnlock].SetActive(true); ResetButton.SetActive(false); ResetLevel(); LoadingScreenUI.SetActive(false); }
private void Awake() { if (singleton == null) { singleton = this; DontDestroyOnLoad(gameObject); } else { Destroy(this); } canvasGroup = GetComponent <CanvasGroup>(); }
private void Start() { string scene = EnvironmentVariables.singleton.gameServerModel.metadata.scene; if (SceneManager.GetActiveScene().name == scene) { return; } LoadingScreenUI loadingScreenUI = LoadingScreenUI.singleton; if (loadingScreenUI == null) { return; } loadingScreenUI.OnShow += () => { SceneManager.LoadScene(scene); loadingScreenUI.Hide(); }; loadingScreenUI.Show("Connecting to Game Server"); }
public void Start() { // --- Getting GameObjects --- rocketShip = GameObject.FindGameObjectWithTag("Player"); cameraScript = GameObject.FindGameObjectWithTag("MainCamera"); LoadingScreenUI = GameObject.FindGameObjectWithTag("LoadingScreen"); // --- Getting UI Gameobjects --- mainMenuPanel = GameObject.FindGameObjectWithTag("LevelMenu"); winBoxUI = GameObject.FindGameObjectWithTag("WinBoxUI"); levelButtons = GameObject.FindGameObjectsWithTag("LevelButtons"); ResetButton = GameObject.FindGameObjectWithTag("ResetButton"); for (int x = 1; x < levelButtons.Length; x++) { levelButtons[x].SetActive(false); } ResetButton.SetActive(false); winBoxUI.SetActive(false); LoadingScreenUI.SetActive(false); }
public void GoToSceneSelect() { LoadingScreenUI.LoadScene(LevelManager.LevelSelectScene, false); }
/// <summary> Handles selecting Recall Button </summary> public void Recall() { LoadingScreenUI.LoadRecall(RecallScene, true); }
/// <summary> Handles selecting Rehearsal Button </summary> public void Rehearsal() { LoadingScreenUI.LoadRehearsal(RehearsalScene, true); }
/// <summary> Handles selecting PrototypeSelect Button </summary> public void PrototypeSelect() { LoadingScreenUI.LoadScene(PrototypeSelectScene, true); }
/// <summary> /// This is the App Start in the shared project. Will be called by Android/iOS Project /// </summary> protected override void OnStart() { Task.Run(() => Kucha.LoadPersistantData()); MainPage = new LoadingScreenUI(); }
private void selectLevel() { string sceneName = levelList[currentLevel].sceneName; LoadingScreenUI.LoadScene(sceneName, false); }
// --- Hides the Loading Screen --- public void hideLoadingScreen() { LoadingScreenUI.SetActive(false); }
// --- Brings Up The Loading Screen --- public void openLoadingScreen() { LoadingScreenUI.SetActive(true); }
static private LoadingScreenUI setInstance() { instance = HUDManager.Instance.GetComponentInChildren <LoadingScreenUI>(true); return(instance); }
static int Main(string[] args) { InitLogger(); try { if (!CheckForOtherInstances()) { Exit(ExitCode.ALREADY_RUNNING); } } #region CheckForOtherInstances Error Handling catch (System.ComponentModel.Win32Exception e) { Logger.Error("Win32 Error Code: " + e.NativeErrorCode + " (native) " + e.ErrorCode + " (managed)"); Logger.LogException(e); //MessageBox.Show(GetWin23ExeptionMessage(e), "Win32 error", MessageBoxButtons.OK, MessageBoxIcon.Error); var errorUI = new FatalErrorUI("Win32 error", GetWin23ExeptionMessage(e)); errorUI.ShowDialog(); Exit(ExitCode.WIN32_EXCPTION); } catch (Exception e) { Logger.Error("Normal ERROR"); Logger.LogException(e); //MessageBox.Show(GetExceptionMessage(e), "Normal Exception", MessageBoxButtons.OK, MessageBoxIcon.Error); var errorUI = new FatalErrorUI("Normal Exception", GetExceptionMessage(e)); errorUI.ShowDialog(); Exit(ExitCode.CLR_EXCPTION); } #endregion if (args.Length > 0) { Logger.Message("Args: " + args.Aggregate("", (str1, str2) => str1 + " " + str2)); } else { Logger.Message("No args"); } #if CREATE_LANGUAGE_XMLS WriteOutLanguageXmls(); #endif Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Settings settings = new Settings(); if (settings.FirstBoot) { Logger.Message("First boot"); Application.Run(new InitConfigUI()); settings = new Settings(); if (settings.FirstBoot) { Logger.Error("Exit: INIT_SETUP_FAILED"); return((int)ExitCode.INIT_SETUP_FAILED); } } Form ui = null; LoadingScreenUI loadingUI = new LoadingScreenUI(async(progress, ct, cts) => { try { ui = await LoadApplication(progress, args, ct, cts); } catch (System.ComponentModel.Win32Exception e) { Logger.Error("Win32 Error Code: " + e.NativeErrorCode + " (native) " + e.ErrorCode + " (managed)"); Logger.LogException(e); //MessageBox.Show(GetWin23ExeptionMessage(e), "Win32 error", MessageBoxButtons.OK, MessageBoxIcon.Error); var errorUI = new FatalErrorUI("Win32 error", GetWin23ExeptionMessage(e)); errorUI.ShowDialog(ui); Exit(ExitCode.WIN32_EXCPTION); } catch (Exception e) { Logger.Error("Normal ERROR"); Logger.LogException(e); //MessageBox.Show(GetExceptionMessage(e), "Normal Exception", MessageBoxButtons.OK, MessageBoxIcon.Error); var errorUI = new FatalErrorUI("Normal Exception", GetExceptionMessage(e)); errorUI.ShowDialog(ui); Exit(ExitCode.CLR_EXCPTION); } }); Application.Run(loadingUI); GC.Collect(); if (ui == null) { return((int)ExitCode.STARTUP_FAILED); } try { //display ui and run Application.Run(ui); } catch (System.ComponentModel.Win32Exception e) { Logger.Error("Win32 Error Code: " + e.NativeErrorCode + " (native) " + e.ErrorCode + " (managed)"); Logger.LogException(e); MessageBox.Show(GetWin23ExeptionMessage(e), "Win32 error", MessageBoxButtons.OK, MessageBoxIcon.Error); Exit(ExitCode.WIN32_EXCPTION); } catch (Exception e) { Logger.Error("Normal ERROR"); Logger.LogException(e); MessageBox.Show(GetExceptionMessage(e), "Normal Exception", MessageBoxButtons.OK, MessageBoxIcon.Error); Exit(ExitCode.CLR_EXCPTION); } Cleanup(); return((int)ExitCode.OK); }