コード例 #1
0
            public IEnumerator PlayerSearchRoutine(string search, IAdminApi caller)
            {
                string uri  = NetworkSettings.instance.BaseUri() + "/api/admin/players/search";
                var    form = new WWWForm();

                form.AddField("playerId", NetworkSettings.instance.username);
                form.AddField("authtoken", NetworkSettings.instance.authtoken);
                form.AddField("search_string", search);
                WWW www = new WWW(uri, form.data, form.headers);

                yield return(www);

                if (www.error != null)
                {
                    caller.OnPlayerSearchError(www.error);
                }
                else
                {
                    MemoryStream stream  = new MemoryStream(www.bytes);
                    Players      players = Serializer.Deserialize <Players>(stream);
                    caller.OnPlayerSearch(players);
                }
            }
コード例 #2
0
 void IAdminApi.OnPlayerSearch(io.gamemachine.messages.Players players)
 {
     throw new System.NotImplementedException();
 }