public void PowerOn() { transform.FindChild("TF_Post").gameObject.SetActive(false); UtilMgr.AddBackEvent(new EventDelegate(this, "BackPressed")); Mail = new GetMailEvent(new EventDelegate(this, "Setdata")); NetMgr.GetUserMailBox(UserMgr.UserInfo.memSeq, Mail); }
public void on() { // if (transform.FindChild ("TF_Post").gameObject.activeSelf) { // transform.FindChild ("TF_Post").gameObject.SetActive (false); // } else { UtilMgr.AddBackEvent(new EventDelegate(this, "BackPressed")); Mail = new GetMailEvent(new EventDelegate(this, "Setdata")); NetMgr.GetUserMailBox(UserMgr.UserInfo.memSeq, Mail); // } // // // }
public void Init(GetCardInvenEvent cardEvent, GetMailEvent mailEvent) { transform.gameObject.SetActive(true); transform.FindChild("Top").FindChild("Cards").FindChild("LblCardsV").GetComponent <UILabel>().text = cardEvent.Response.data.Count + " / " + UserMgr.LobbyInfo.userInvenOfCard; // transform.FindChild("Top").FindChild("Skills").FindChild("LblSkillsV").GetComponent<UILabel>().text // = 0+""; mCardEvent = cardEvent; mMailEvent = mailEvent; mList = cardEvent.Response.data; foreach (CardInfo cardInfo in mList) { cardInfo.mType = CardInfo.INVEN_TYPE.CARD; } for (int i = 0; i < mailEvent.Response.data.Count; i++) { Mailinfo mailInfo = mailEvent.Response.data[i]; if (mailInfo.mailType == 1) { CardInfo item = new CardInfo(); item.mType = CardInfo.INVEN_TYPE.PACK; item.mMailinfo = mailInfo; mList.Insert(0, item); } } int listCnt = mList.Count; if (UserMgr.LobbyInfo.userInvenOfCard < UserMgr.LobbyInfo.maxInvenOfCard && cardEvent.Response.data.Count > UserMgr.LobbyInfo.userInvenOfCard) { CardInfo expand = new CardInfo(); expand.mType = CardInfo.INVEN_TYPE.EXPAND; mList.Insert(UserMgr.LobbyInfo.userInvenOfCard, expand); listCnt = UserMgr.LobbyInfo.userInvenOfCard + 1; } transform.FindChild("Body").FindChild("Draggable").GetComponent <UIDraggablePanel2>().RemoveAll(); transform.FindChild("Body").FindChild("Draggable").GetComponent <UIDraggablePanel2>() .Init(listCnt, delegate(UIListItem item, int index){ InitInvenItem(item, index); }); transform.FindChild("Body").FindChild("Draggable").GetComponent <UIDraggablePanel2>().ResetPosition(); }
public void Init(GetCardInvenEvent cardEvent, GetMailEvent mailEvent) { transform.gameObject.SetActive(true); transform.FindChild("Top").FindChild("Cards").FindChild("LblCardsV").GetComponent<UILabel>().text = cardEvent.Response.data.Count+" / "+UserMgr.LobbyInfo.userInvenOfCard; // transform.FindChild("Top").FindChild("Skills").FindChild("LblSkillsV").GetComponent<UILabel>().text // = 0+""; mCardEvent = cardEvent; mMailEvent = mailEvent; mList = cardEvent.Response.data; foreach(CardInfo cardInfo in mList) cardInfo.mType = CardInfo.INVEN_TYPE.CARD; for(int i = 0; i < mailEvent.Response.data.Count; i++){ Mailinfo mailInfo = mailEvent.Response.data[i]; if(mailInfo.mailType == 1){ CardInfo item = new CardInfo(); item.mType = CardInfo.INVEN_TYPE.PACK; item.mMailinfo = mailInfo; mList.Insert(0, item); } } int listCnt = mList.Count; if(UserMgr.LobbyInfo.userInvenOfCard < UserMgr.LobbyInfo.maxInvenOfCard && cardEvent.Response.data.Count > UserMgr.LobbyInfo.userInvenOfCard){ CardInfo expand = new CardInfo(); expand.mType = CardInfo.INVEN_TYPE.EXPAND; mList.Insert(UserMgr.LobbyInfo.userInvenOfCard, expand); listCnt = UserMgr.LobbyInfo.userInvenOfCard +1; } transform.FindChild("Body").FindChild("Draggable").GetComponent<UIDraggablePanel2>().RemoveAll(); transform.FindChild("Body").FindChild("Draggable").GetComponent<UIDraggablePanel2>() .Init(listCnt, delegate (UIListItem item, int index){ InitInvenItem(item, index); }); transform.FindChild("Body").FindChild("Draggable").GetComponent<UIDraggablePanel2>().ResetPosition(); }
void ReceivedCards() { UserMgr.CardList = mCardEvent.Response.data; mMailEvent = new GetMailEvent(ReceivedMail); NetMgr.GetUserMailBox(mMailEvent); }
public void Start() { transform.FindChild("TF_Post").gameObject.SetActive(false); Mail = new GetMailEvent(new EventDelegate(this, "getdata")); NetMgr.GetUserMailBox(UserMgr.UserInfo.memSeq, Mail); }
void ReceivedCards() { mMailEvent = new GetMailEvent(ReceivedMails); NetMgr.GetUserMailBox(mMailEvent); }