public void ShowGameplay(bool isReset = true) { if (isReset) { if (CurrentQuestionPanel != null) { Debug.LogError("From ShowGameplay"); CurrentQuestionPanel.Reset(); } } ShowHideElementsOfGameplayAccordingToMode(); BaseQuestion currentQuestion = GameManager.Instance.GetCurrentQuestion(); QuestionText.text = currentQuestion.Question; if (currentQuestion.HasTimerValue) { UITimer.SetTimer(Mathf.RoundToInt(GameManager.Instance.GetCurrentQuestion(true).TimeForQuestion)); ShowHideGameObject(UITimer.gameObject, ShowHideAction.Show); } else { ShowHideGameObject(UITimer.gameObject, ShowHideAction.Hide); } }
//TODO Show or hide timer in intro panel public void SetUpIntro(string introText, int timeForIntro, bool showOkButton, bool hasTimerValue) { IntroText.text = introText; if (timeForIntro > 0) { counter = 0; this.timeForIntro = timeForIntro; GameManager.Instance.TimeTicker += CountTime; IntroTimer.SetTimer(timeForIntro); IntroTimer.gameObject.Show(); } else { IntroTimer.gameObject.Hide(); } if (showOkButton) { OkButton.gameObject.Show(); } else { OkButton.gameObject.Hide(); } }