Пример #1
0
    private void TransitionCorrectBuzz()
    {
        EliminateFalseAnswer();
        foreach (PlayerModel e in teamsCtrl)
        {
            //change the team's answer button to the color of the one they chose
            ChangeTeamColor(e.GetNumberAnswer(), e);

            for (int i = 0; i < questions.First().Answers.Length; i++)
            {
                currAnswer = questions.First().Answers[i];
                //Check if PlayerControler answered and gave the good answer
                if (e.GetAnswer().Equals(currAnswer.AnswerText) && currAnswer.IsTrue)
                {
                    DataModel.AddScoreToTeam(e.GetCurrentRoundPoints(), teamsCtrl.IndexOf(e));
                }
            }
        }

        for (int i = 0; i < teamsButton.Count; i++)
        {
            teamsButton[i].GetComponentInChildren <TextMeshProUGUI>().text = DataModel.GetTextScoreFromTeam(i);
        }
        GameObject.Find("ArrowButton").GetComponent <Button>().interactable = true;

        arrow.GetComponent <CanvasGroup>().alpha = 1;
        isNextAvailable = true;
    }