示例#1
0
    public NetParam GetUserRecord()
    {
        string username = PlayerPrefs.GetString("username");
        string password = PlayerPrefs.GetString("password");

        NetParam param = new NetParam();

        param.SetParam((byte)LoginType.NETWORK_LOGIN, "", username, password);
        return(param);
    }
示例#2
0
    //登录
    public void Login(string username, string password)
    {
        //发起http请求获得token,user id
        string uri = HTTP_LOGIN_SERVER_ADDRESS;

        NetParam param = new NetParam();

        param.SetParam((byte)LoginType.NETWORK_LOGIN, uri, username, password);
        readerResponse.Add(param);

        Dictionary <string, string> post = new Dictionary <string, string>();

        post.Add("logic", "0");
        post.Add("uname", username);
        post.Add("pw", password);
        //by te on 20170616
        HttpConnection.Instance.Connect(uri, post, HttpSuccess);
        //StartCoroutine(HttpGet(uri,post));
    }