Beispiel #1
0
    // Initialize Start Screen UI
    private void InitializeStartUI()
    {
        LevelData data = VRMissionModeManager.Instance.levelData;

        targetText.text = "Targets: " + VRMissionModeManager.Instance.Targets;

        if (data.bHasScore)
        {
            if (VRMissionModeManager.Instance.BestScore != -1)
            {
                bestTimeText.text = "Best: " + VRMissionModeManager.Instance.BestScore.ToString();
            }

            parTimeText.gameObject.SetActive(true);
            parTimeText.text = "Par Time: " + data.parTime.SGetTimeString();

            goldText.text   = "Gold: " + data.iGoldScore.ToString();
            silverText.text = "Silver: " + data.iSilverScore.ToString();
            bronzeText.text = "Bronze: " + data.iBronzeScore.ToString();
        }
        else
        {
            if (VRMissionModeManager.Instance.BestTime != -1)
            {
                bestTimeText.text = "Best: " + LevelTime.SConvertToTimeString(VRMissionModeManager.Instance.BestTime);
            }

            goldText.text   = "Gold: " + data.goldTime.SGetTimeString();
            silverText.text = "Silver: " + data.silverTime.SGetTimeString();
            bronzeText.text = "Bronze: " + data.bronzeTime.SGetTimeString();
        }
    }
Beispiel #2
0
    // Initializes end screen UI
    private void InitializeUI()
    {
        if (VRMissionModeManager.Instance.nextMissionLevelData == null)
        {
            nextMissionButton.interactable = false;
        }

        if (VRMissionModeManager.Instance.levelData.bHasScore)
        {
            endTimeText.text = "Score: " + VRMissionModeManager.Instance.missionScore.Score.ToString();

            parTimeText.gameObject.SetActive(true);
            parTimeText.text = "Par Time: " + VRMissionModeManager.Instance.levelData.parTime.SGetTimeString();

            timeBonusText.gameObject.SetActive(true);
            timeBonusText.text = "Time Bonus: " + VRMissionModeManager.Instance.TimeBonus.ToString();

            endBestTimeText.text = "Best: " + VRMissionModeManager.Instance.BestScore.ToString();
            endRankText.text     = "Rank: " + VRMissionModeManager.Instance.EndRank;
        }
        else
        {
            endTimeText.text     = "Time: " + LevelTime.SConvertToTimeString(VRMissionModeManager.Instance.missionTimer.CurrentTime);
            endBestTimeText.text = "Best: " + LevelTime.SConvertToTimeString(VRMissionModeManager.Instance.BestTime);
            endRankText.text     = "Rank: " + VRMissionModeManager.Instance.EndRank;
        }

        switch (VRMissionModeManager.Instance.EndRank)
        {
        case "Gold":
            endRankText.color = goldRankColour;
            break;

        case "Silver":
            endRankText.color = silverRankColour;
            break;

        case "Bronze":
            endRankText.color = bronzeRankColour;
            break;

        default:
            endRankText.color = noRankColour;
            break;
        }
    }
Beispiel #3
0
    // Initialization
    protected override void Start()
    {
        iCurrentLevel = 0;

        asLevelTimeStrings  = new string[levelList.aLevelData.Length];
        asLevelScoreStrings = new string[levelList.aLevelData.Length];

        for (int i = 0; i < asLevelTimeStrings.Length; i++)
        {
            float time  = ProfileDataManager.Instance.LoadVRMissionTime(levelList.aLevelData[i].sLevelName);
            int   score = ProfileDataManager.Instance.LoadVRMissionScore(levelList.aLevelData[i].sLevelName);
            asLevelTimeStrings[i]  = time == -1 ? "Best: --:--.--" : "Best: " + LevelTime.SConvertToTimeString(time);
            asLevelScoreStrings[i] = score == -1 ? "Best: -----" : "Best: " + score.ToString();
        }

        InitializeButtons();
        UpdateUI();

        StartCoroutine(SetObjectSelection());
    }