Example #1
0
 public void LoginBack(Login.LoginRsp login)
 {
     if (login.usertype != 0)
     {
         if (login.usertype == 2)
         {
             GameConst.isDaili = false;
             GameConst.isGM    = true;
         }
         else if (login.usertype == 1)
         {
             GameConst.isGM    = false;
             GameConst.isDaili = true;
         }
     }
     MainRole.Instance.Id = login.id;
     //MainRole.Instance.Name = login.name
     DataMgr.Instance.money = login.money;
     Debug.Log("id" + login.id);
     //QuickTips.ShowGreenQuickTips("登录成功");
     ProtoReq.EnterRoom();
     HallPanel.Instance.load();
     if (login.extmoney > 0)
     {
         //QuickTips.ShowBlueQuickTips("登录奖励钻石:" + login.extmoney);
         AlertMgr.Instance.showAlert(ALERT_TYPE.type2, "登录奖励钻石:" + login.extmoney);
     }
     //HallPanel.Instance.load();
 }
Example #2
0
 void onLogin(Msg msg)
 {
     Login.LoginRsp login = (Login.LoginRsp)msg.body;
     Debug.Log("onLogin " + login.account + " and " + login.token);
     try{
         UnityEngine.SceneManagement.SceneManager.LoadScene("hall");
     }catch (Exception e) {
         Debug.Log(e.ToString());
     }
 }
Example #3
0
 private void login_rsp(Msg msg)
 {
     //登录返回
     Debug.LogError("登录返回");
     Login.LoginRsp rsp = (Login.LoginRsp)msg.body;
     if (rsp.err_no == 0)
     {
         LoginController.Instance.LoginBack((Login.LoginRsp)msg.body);
     }
     else if (rsp.err_no == 2)
     {
         AlertMgr.Instance.showAlert(ALERT_TYPE.type3, "请到官网 http://27toy.com/ 下载最新版本", delegate() {
             Application.OpenURL("http://27toy.com/");
         });
     }
     else if (rsp.err_no == 1)
     {
         //QuickTips.ShowQuickTipsNor ("用户名密码错误,请重新输入");
         AlertMgr.Instance.showAlert(ALERT_TYPE.type2, "用户密码错误", delegate()
         {
         });
     }
 }