Exemplo n.º 1
0
    protected override void ShowStarted()
    {
        base.ShowStarted();
        isWaitingForSave = false;
        uploadLoadingText.SetSuccess(false);
        downloadLoadingText.SetSuccess(false);

        ShowMenuExclusively(baseMenu);
        nameText.text        = WorkingLevelData.name;
        descriptionText.text = WorkingLevelData.description;
        levelImage.sprite    = WorkingLevelData.MySprite;
    }
Exemplo n.º 2
0
    private IEnumerator LoadingCoroutine()
    {
        SpawnManager.spawnersLocked = true;
        MEC.Timing.KillCoroutines();
        ObjectPool.Instance.ResetPools();
        loadingBar.size = 0.0F;
        loaded          = false;
        AsyncOperation async = SceneManager.LoadSceneAsync(target);

        while (!async.isDone)
        {
            loadingBar.size = Mathf.Lerp(0.0F, 1.0F, async.progress);
            yield return(new WaitForEndOfFrame());
        }
        loadingBarText.SetSuccess(true);
        // Prewarm shaders to prevent lag during level.
        //Shader.WarmupAllShaders();

        loadingBar.size  = 1.0F;
        loadingText.text = ready;
        loaded           = true;
        EventSystem.Instance.TriggerEvent(Strings.Events.SCENE_LOADED);
        if (onCompleteSceneLoad != null)
        {
            onCompleteSceneLoad();
        }
    }
Exemplo n.º 3
0
    private void GetLeaderboardEntries(LeaderBoards.SelectionType selectionType)
    {
        currentSelectionType = selectionType;
        foreach (LeaderboardEntry entry in leaderBoardEntries)
        {
            entry.IsVisible(false);
        }
        if (!loadingText.IsWaitingForConfirmation)
        {
            loadingObject.SetActive(true);
            loadingText.IsWaitingForConfirmation = true;
            bool result = LeaderBoards.Instance.GetLeaderBoardData(currentLevelName, OnLeaderBoardEntriesReturned, maxEntries, selectionType);
            if (!result)
            {
                loadingText.SetSuccess(false);
            }

            verticalScrollbar.value = 1f;
        }
    }