public void CheckProgress() { if (exercise.Progress == ExerciseProgress.Succeeded || exercise.Progress == ExerciseProgress.Failed) { if (ExplanationUI != null) { ExplanationUI.SetActive(false); } if (FeedbackUI != null) { FeedbackUI.GetComponent <MeshRenderer>().enabled = true; } if (!HasSetGUI) { DisplayStats(); HasSetGUI = true; } } else { if (ExplanationUI != null) { ExplanationUI.SetActive(true); } if (FeedbackUI != null) { FeedbackUI.GetComponent <MeshRenderer>().enabled = false; } HasSetGUI = false; } }
private void Start() { // Seeing which level needs to be loaded // [TO DO] // This is currently being done with PlayerPrefs, maybe there is a better way?! // i.e. Having an object that persists data between scenes m_levelToLoad = PlayerPrefs.GetString(SerializeUtility.LEVEL_TO_LOAD) ?? km_levelToLoad; m_feedbackUIReference = FindObjectOfType <FeedbackUI>(); m_soundManagerReference = FindObjectOfType <SoundManager>(); m_unusedCells = new List <GameplayCell>(); m_questionCells = new List <GameplayCell>(); m_answerCells = new List <GameplayCell>(); m_gameplayCells = new List <GameplayCell>(); m_boardGridLayoutPanel = gridPanel.GetComponent <GridLayoutGroup>(); m_answerBankGridLayout = solutionBank.GetComponent <GridLayoutGroup>(); InitializeLevel(); RemoveUnusedCells(m_unusedCells); ShuffleAnswers(); // Deactivating Panels gameOverPanel.SetActive(false); pausePanel.SetActive(false); // Starting Timer m_timeRemaining = gameplayConfiguration.baseTime; StartCoroutine(TimerRoutine()); m_feedbackUIReference.UpdateTimer(Mathf.RoundToInt(m_timeRemaining)); }
public void Start() { if (ExplanationUI != null) { ExplanationUI.SetActive(true); } if (FeedbackUI != null) { FeedbackUI.GetComponent <MeshRenderer>().enabled = false; } leftGun = exercise.Player.leftHand.gun; rightGun = exercise.Player.rightHand.gun; ClearBoard(); }