コード例 #1
0
ファイル: MenuAndUIScript.cs プロジェクト: Noxsolum/SpaceGame
    // --- Hides the Level Select ---
    public void hideMenu()
    {
        LoadingScreenUI.SetActive(true);

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

        LoadingScreenUI.SetActive(false);
    }
コード例 #2
0
    public void StartDemoWithRecallMode()
    {
        if (!CheckValidSeed())
        {
            return;
        }
        InteractablePathManager.SeedString = seedInputField.text;
        string sceneName = selectedDemo.sceneName;

        LoadingScreenUI.LoadRecall(sceneName, true);
    }
コード例 #3
0
ファイル: MenuAndUIScript.cs プロジェクト: Noxsolum/SpaceGame
    public void hideWinBox()
    {
        LoadingScreenUI.SetActive(true);

        clearLevel();
        winBoxUI.SetActive(false);
        mainMenuPanel.SetActive(true);
        levelButtons[levelUnlock].SetActive(true);
        ResetButton.SetActive(false);
        ResetLevel();

        LoadingScreenUI.SetActive(false);
    }
コード例 #4
0
    private void Awake()
    {
        if (singleton == null)
        {
            singleton = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(this);
        }

        canvasGroup = GetComponent <CanvasGroup>();
    }
コード例 #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");
    }
コード例 #6
0
ファイル: MenuAndUIScript.cs プロジェクト: Noxsolum/SpaceGame
    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);
    }
コード例 #7
0
 public void GoToSceneSelect()
 {
     LoadingScreenUI.LoadScene(LevelManager.LevelSelectScene, false);
 }
コード例 #8
0
 /// <summary> Handles selecting Recall Button </summary>
 public void Recall()
 {
     LoadingScreenUI.LoadRecall(RecallScene, true);
 }
コード例 #9
0
 /// <summary> Handles selecting Rehearsal Button </summary>
 public void Rehearsal()
 {
     LoadingScreenUI.LoadRehearsal(RehearsalScene, true);
 }
コード例 #10
0
 /// <summary> Handles selecting PrototypeSelect Button </summary>
 public void PrototypeSelect()
 {
     LoadingScreenUI.LoadScene(PrototypeSelectScene, true);
 }
コード例 #11
0
ファイル: App.cs プロジェクト: saw-leipzig/KuchaMobile
        /// <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();
        }
コード例 #12
0
ファイル: LevelSelect.cs プロジェクト: jaywgraves/seedQuest
    private void selectLevel()
    {
        string sceneName = levelList[currentLevel].sceneName;

        LoadingScreenUI.LoadScene(sceneName, false);
    }
コード例 #13
0
ファイル: MenuAndUIScript.cs プロジェクト: Noxsolum/SpaceGame
 // --- Hides the Loading Screen ---
 public void hideLoadingScreen()
 {
     LoadingScreenUI.SetActive(false);
 }
コード例 #14
0
ファイル: MenuAndUIScript.cs プロジェクト: Noxsolum/SpaceGame
 // --- Brings Up The Loading Screen ---
 public void openLoadingScreen()
 {
     LoadingScreenUI.SetActive(true);
 }
コード例 #15
0
 static private LoadingScreenUI setInstance()
 {
     instance = HUDManager.Instance.GetComponentInChildren <LoadingScreenUI>(true); return(instance);
 }
コード例 #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);
        }