Beispiel #1
0
    public async Task FinishGame(string gameId, List <GivenAnswer> givenAnswers, int rightAnswerCount, int score)
    {
        var finishGameRequest = new FinishGameRequest {
            givenAnswers = givenAnswers, gameId = gameId, rightAnswerCount = rightAnswerCount, score = score
        };
        var json = JsonUtility.ToJson(finishGameRequest);

        await _postWithData("functions/finish_game", json);
    }
 private void  Start()
 {
     finishGameRequest = GetComponent <FinishGameRequest>();
 }