Пример #1
0
 public void SubmitGameScore(string playerName, int points)
 {
     var scoreForm   = new WWWForm();
     var checkSum    = CheckSumScore.CheckSum(playerName, points);
     var scoreSubmit = new WWW(_serverUri + "Score" +
                               "?gameName=" + _gameName +
                               "?userName="******"?checkSum=" + checkSum +
                               "?points=" + points);
 }
Пример #2
0
        public IEnumerator SubmitGameScore(string playerName,
                                           int points,
                                           Action <bool> responseHandler)
        {
            var checkSum = CheckSumScore.CheckSum(playerName, points);
            var request  = new WWW(_serverUri + "Score" +
                                   "?gameName=" + _gameName +
                                   "&playerName=" + playerName +
                                   "&points=" + points +
                                   "&checkSum=" + checkSum);

            yield return(request);

            if (request.error != null)
            {
                Debug.LogError(request.error);
            }
            else
            {
                var reader = new JsonReader();
                responseHandler(reader.Read <bool>(request.text));
            }
        }