public void Show(QuestionPlan plan, Action <QuestionPlan> onQuestionSelected) { _plan = plan; _onQuestionSelected = onQuestionSelected; ShowGameObject(); _price.text = plan.Price.ToString(); }
private void RemoveQuestion(QuestionPlan question) { _questions[question].Close(); _questions.Remove(question); if (_questions.Count <= 0) { _onQuestionsEnded.Invoke(_plan); } }
public void Show(QuestionPlan plan, UIController controller) { _canAcceptAnswers = false; _plan = plan; _uiController = controller; _questionTimer = new QuizTimer(MinTimer, _questionTimerPanel, true, new[] { new TimerThreshold(3, () => { SoundManager.Instance.PlayNoAnswer(); }), new TimerThreshold(0, () => { _wasAnswerCorrect = false; Close(); }) }); if (_plan.IsCatInPoke) { _catInPokePlayer = null; _catInPokeScreen.Show( _uiController.PlayerViews.Keys.ToList(), _plan.CatInPoke, player => { Display(); _catInPokeScreen.Close(); _catInPokePlayer = player; _answeringPlayer = null; ShowQuestion(); }); } else { Display(); ShowQuestion(); } }