示例#1
0
    IEnumerator LoadUserDataC3(int client_id)
    {
        string path = serverURL + GetClientTags + "?id=" + client_id;

        print("path" + path);
        WWW www = new WWW(path);

        yield return(www);

        if (www.error != null)
        {
            OnClientDataDone(null);
        }
        else
        {
            string result = www.text;
            clientDataJson = JsonUtility.FromJson <ClientDataJson>(result);
            if (clientDataJson == null || clientDataJson.all.Count == 0)
            {
                OnClientDataDone(null);
            }
            else
            {
                OnClientDataDone(clientDataJson);
            }
        }
    }
示例#2
0
    IEnumerator LoadUserDataC2(string password)
    {
        string path = serverURL + GetClient + "?password="******"path" + path);
        WWW www = new WWW(path);

        yield return(www);

        if (www.error != null || www.text == "false")
        {
            OnClientDataDone(null);
        }
        else
        {
            string result = www.text;
            print(result);
            clientDataJson = JsonUtility.FromJson <ClientDataJson>(result);
            GetClientByPassword(clientDataJson.id);
        }
    }