Ejemplo n.º 1
0
        public void Show(QuestionPlan plan, Action <QuestionPlan> onQuestionSelected)
        {
            _plan = plan;
            _onQuestionSelected = onQuestionSelected;

            ShowGameObject();

            _price.text = plan.Price.ToString();
        }
Ejemplo n.º 2
0
        private void RemoveQuestion(QuestionPlan question)
        {
            _questions[question].Close();

            _questions.Remove(question);

            if (_questions.Count <= 0)
            {
                _onQuestionsEnded.Invoke(_plan);
            }
        }
Ejemplo n.º 3
0
        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();
            }
        }