Esempio n. 1
0
 private void UpdateLogin(CMsgAccountLoginResponse data)
 {
     if (data != null)
     {
         Debug.Log(data.accountid);
     }
 }
    public static void HandlerLogin(int msgId, object obj)
    {
        CMsgAccountLoginResponse rsp = obj as CMsgAccountLoginResponse;

        if (rsp != null)
        {
            Messenger.Broadcast <CMsgAccountLoginResponse>(MessageNotice.MN_LOGIN, rsp);
        }
    }
Esempio n. 3
0
 private void UpdateLogin(CMsgAccountLoginResponse data)
 {
     if (data != null)
     {
         if (data.accountid == 0)
         {
             ShowErrorMsg("登陆失败!");
         }
         else
         {
             ShowErrorMsg("登陆成功! accountid: " + data.accountid);
         }
         Debug.Log("recv accountid: " + data.accountid);
     }
 }
    private void OnAccountLoginResponse(MemoryStream stream)
    {
        CMsgAccountLoginResponse response = ProtoBuf.Serializer.Deserialize <CMsgAccountLoginResponse>(stream);
        long accountid = response.accountid;

        Debug.Log("-------accountid:" + accountid);
        if (accountid == 0)
        {
            LoginUI.Instance.ShowErrorMsg("该用户不存在");
        }
        else
        {
            ApplicationData.accountid = accountid;
            Application.LoadLevel("role");
        }
    }