Beispiel #1
0
    // Use this for initialization
    public static void LoginRspHandle(qp_server.qp_login_rsp rsp)
    {
        //只处理正确的返回
        if (rsp.state != 0)
        {
            return;
        }

        GlobalData.Ins.userId        = rsp.public_data.user_id;
        GlobalData.Ins.nickname      = rsp.public_data.nick_name;
        GlobalData.Ins.avatarUrl     = rsp.public_data.avatar_url;
        GlobalData.Ins.roomCardCount = rsp.private_data.room_card_count;

        if (rsp.room_data != null)
        {
            //初始化房间信息

            Scheduling.Ins.ChangeScene(SceneType.ST_Room, delegate() {
                GlobalData.Ins.SetRoomData(rsp.room_data);
            });
        }
        else
        {
            Scheduling.Ins.ChangeScene(SceneType.ST_Hall);
        }
    }
Beispiel #2
0
 void OnLoginRsp(qp_server.qp_login_rsp rsp)
 {
     Log.Logic("room login_rsp state={0}", rsp.state);
     if (rsp.state != 0)
     {
         Scheduling.Ins.ChangeScene(SceneType.ST_Login);
     }
     else
     {
         NetPacketHandle.LoginRspHandle(rsp);
     }
 }
Beispiel #3
0
 void OnLoginRsp(qp_server.qp_login_rsp rsp)
 {
     Log.Logic("login_rsp state={0}", rsp.state);
     if (rsp.state != 0)
     {
         DestoryBlocked();
         if (accountLoginControl != null)
         {
             accountLoginControl.SetState("账号验证失败");
         }
     }
     else
     {
         DestoryBlocked();
         NetPacketHandle.LoginRspHandle(rsp);
     }
 }