// Changes the Menu Screen public void GoToScreen(string panelID) { if (menuManager == null) { return; } menuManager.GoToScreen(panelID); }
// Ends the Mission public void EndMission() { // Check Time for Rank if (levelData.bHasScore) { CalculateTimeBonus(); CheckEndRankingScore(missionScore.Score); } else if (levelData.bHasTime) { CheckEndRanking(missionTimer.CurrentTime); } // Stop Timer StopMissionTimer(); if (levelData.bHasScore) { if (iBestScore == -1 || missionScore.Score > iBestScore) { iBestScore = missionScore.Score; ProfileDataManager.Instance.SaveVRMissionScore(levelData.sLevelName, iBestScore); } } else if (levelData.bHasTime) { // No previous best time or beat best time if (fBestTime == -1 || missionTimer.CurrentTime < fBestTime) { fBestTime = missionTimer.CurrentTime; ProfileDataManager.Instance.SaveVRMissionTime(levelData.sLevelName, fBestTime); } } // Disable Mission UI goMissionUI.SetActive(false); // Show End Screen UI vrMenuManager.gameObject.SetActive(true); GameManager.PauseMenuManager.goPauseUI.SetActive(false); vrMenuManager.GoToScreen("VREnd"); }