// --- Hides the Level Select ---
    public void hideMenu()
    {
        LoadingScreenUI.SetActive(true);

        mainMenuPanel.SetActive(false);
        ResetButton.SetActive(true);

        LoadingScreenUI.SetActive(false);
    }
Exemple #2
0
    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);
    }
Exemple #4
0
    private void Awake()
    {
        if (singleton == null)
        {
            singleton = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(this);
        }

        canvasGroup = GetComponent <CanvasGroup>();
    }
Exemple #5
0
    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);
    }
Exemple #7
0
 public void GoToSceneSelect()
 {
     LoadingScreenUI.LoadScene(LevelManager.LevelSelectScene, false);
 }
Exemple #8
0
 /// <summary> Handles selecting Recall Button </summary>
 public void Recall()
 {
     LoadingScreenUI.LoadRecall(RecallScene, true);
 }
Exemple #9
0
 /// <summary> Handles selecting Rehearsal Button </summary>
 public void Rehearsal()
 {
     LoadingScreenUI.LoadRehearsal(RehearsalScene, true);
 }
Exemple #10
0
 /// <summary> Handles selecting PrototypeSelect Button </summary>
 public void PrototypeSelect()
 {
     LoadingScreenUI.LoadScene(PrototypeSelectScene, true);
 }
Exemple #11
0
        /// <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();
        }
Exemple #12
0
    private void selectLevel()
    {
        string sceneName = levelList[currentLevel].sceneName;

        LoadingScreenUI.LoadScene(sceneName, false);
    }
Exemple #13
0
 // --- Hides the Loading Screen ---
 public void hideLoadingScreen()
 {
     LoadingScreenUI.SetActive(false);
 }
Exemple #14
0
 // --- Brings Up The Loading Screen ---
 public void openLoadingScreen()
 {
     LoadingScreenUI.SetActive(true);
 }
 static private LoadingScreenUI setInstance()
 {
     instance = HUDManager.Instance.GetComponentInChildren <LoadingScreenUI>(true); return(instance);
 }
Exemple #16
0
        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);
        }