public async void OnConfirmUserInfo()
        {
            try
            {
                //发送设置用户信息消息
                A1002_SetUserInfo_C2G SetUserInfo_Req = new A1002_SetUserInfo_C2G()
                {
                    Phone = Int64.Parse(phone.text),
                    Email = email.text,
                    Sex   = sex.text
                };
                A1002_SetUserInfo_G2C SetUserInfo_Ack = (A1002_SetUserInfo_G2C)await SessionComponent.Instance.Session.Call(SetUserInfo_Req);

                //更新大厅界面上的用户信息
                LandLobbyComponent lobbyComponent = Game.Scene.GetComponent <UIComponent>().Get(LandUIType.LandLobby).GetComponent <LandLobbyComponent>();
                lobbyComponent.UpdateUserInfo(SetUserInfo_Ack);

                //移除用户信息设置界面
                Game.EventSystem.Run(UIEventType.LandSetUserInfoFinish);
            }
            catch (Exception e)
            {
                Log.Error(e);
            }
        }
예제 #2
0
 public void UpdateUserInfo(A1002_SetUserInfo_G2C info)
 {
     phone.text = info.Phone.ToString();
     email.text = info.Email;
     sex.text   = info.Sex;
 }