示例#1
0
    public void CmdSendAnswer(string username, string answer, uint networkId)
    {
        amountOfAnswers++;
        stats.AddAnswer(username, answer, networkId);
        Debug.Log(username + " answered with answer " + answer + " answers so far: " + amountOfAnswers + " out of " + (NetworkServer.connections.Count - 1));

        if (amountOfAnswers >= NetworkServer.connections.Count - 1)
        {
            QuestionsList.CurrentQuestion++;
            Debug.Log("Ready with all anwers. Show Statistics.");
            UIController.Instance.serverUI.SetActive(true);

            if (QuestionsList.CurrentQuestion >= QuestionsList.Questions.Count)
            {
                Debug.LogWarning("Finished with all questions. Do something");
            }
        }
    }