Ejemplo n.º 1
0
    //public override void OnShow()
    //{
    //    Debug.Log(InputFieldUsername);

    //}

    public void OnButtonConfirmClick()
    {
        InputFieldUsername = controls.GetInputField("InputFieldUsername");
        ReqChangeUsername reqChangeUsername = new ReqChangeUsername();

        reqChangeUsername.Userid   = Gamedata.me.userinfo.Id;
        reqChangeUsername.Username = InputFieldUsername.text;
        Net.me.Send(reqChangeUsername);
        Hide();
    }
        public static void OnPacket(Client client, object pack)
        {
            ReqChangeUsername req = pack as ReqChangeUsername;
            ChangeUsername    rsp = new ChangeUsername();

            rsp.Userid   = req.Userid;
            rsp.Username = req.Username;
            client.Send(rsp);
            UserSystem.me.ChangeUsername(req.Userid, req.Username);
            return;
        }