Пример #1
0
                         private IEnumerator CallScoreApi(string url, DelegateAfterGetScores callback = null)
                         {
                             WWW www = new WWW(url);

                             yield return(www);

                             if (callback != null)
                             {
                                 string txt = "";
                                 if (string.IsNullOrEmpty(www.error))
                                 {
                                     txt = www.text;
                                 }
                                 txt = txt.Replace("\"", "");
                                 //txt = txt.Replace(" ", "");
                                 if (callback != null)
                                 {
                                     callback(txt);
                                 }
                             }
                         }
Пример #2
0
 public void GetScores(int level, DelegateAfterGetScores callback)
 {
     GetScores(GameName, level, callback);
 }
Пример #3
0
 public void GetScores(DelegateAfterGetScores callback = null)
 {
     GetScores(GameName, 0, callback);
 }
Пример #4
0
                         /// <summary>
                         /// Get the scores defined in the GameName == GameId in the level specified
                         /// </summary>
                         /// <param name="gameID">Defined by GameName and identify the game in a Playtable</param>
                         /// <param name="level"></param>
                         /// <param name="callback"></param>
                         public void GetScores(string gameID, int level, DelegateAfterGetScores callback)
                         {
                             var url = string.Concat(Authentication.WebServicePath + "Settings/GetRecordes?gameId=", gameID, "&gameDifficult=", level);

                             StartCoroutine(CallScoreApi(url, callback));
                         }