示例#1
0
 public void MailReceive(EmailView view, EmailContextPop p)
 {
     curCallBackView = view;
     mailpop         = p;
     if (view.data.isRevice)
     {
         List <long> list = new List <long>();
         list.Add(curCallBackView.data.id);
         mailpop.receiveBtn.isEnabled = false;
         NetworkManager.Instance.MailReceive(list);
     }
 }
示例#2
0
 public void OpenContext(EmailView view)
 {
     if (MainUI.Instance.GetPopState(MainUI.PopType.EmailContxt) != true)
     {
         GameObject obj = Instantiate(pop.popPrefab);
         obj.SetActive(true);
         EmailContextPop p = obj.GetComponent <EmailContextPop>();
         p.InitData(view);
         p.transform.parent     = pop.transform.parent;
         p.transform.localScale = Vector3.one;
         MainUI.Instance.SetPopState(MainUI.PopType.EmailContxt, true);
     }
 }
示例#3
0
 public void MailReceiveCallBack(C2sSprotoType.mail_getreward.response resp)
 {
     if (mailpop != null)
     {
         mailpop.receiveBtn.isEnabled = true;
         if (resp.errorcode == 1 && curCallBackView != null && mailpop != null)
         {
             curCallBackView.data.isRead   = false;
             curCallBackView.data.isRevice = false;
             curCallBackView.RestView();
             curCallBackView.name = GetSort(curCallBackView.data.isRead, curCallBackView.data.isRevice, curCallBackView.data.id);
             pop.SetInfo();
             if (mailpop != null)
             {
                 mailpop.SetItemList();
             }
             //NetworkManager.Instance.UserInfo();
             Debug.Log("领取成功");
             pop.ResultRestList(curCallBackView);
             for (int i = 0; i < curCallBackView.data.itemList.Count; i++)
             {
                 BagMgr.Instance.AddItemNumById(curCallBackView.data.itemList[i].data.id,
                                                curCallBackView.data.itemList[i].curCount);
             }
             MainUI.Instance.GetItemClick(curCallBackView.data.itemList);
         }
     }
     else if (allrecList != null) //全部领取
     {
         pop.allRecBtn.isEnabled = true;
         if (resp.errorcode == 1)
         {
             for (int aa = 0; aa < allrecList.Count; aa++)
             {
                 BagMgr.Instance.AddItemNumById(allrecList[aa].data.id, allrecList[aa].curCount);
             }
             pop.ReceiveList();
             MainUI.Instance.GetItemClick(allrecList);
         }
     }
     curCallBackView = null;
     mailpop         = null;
     allrecList      = null;
 }