public void Init(CardInfo targetCard)
 {
     mTargetCard = targetCard;
     transform.gameObject.SetActive(true);
     transform.localPosition = new Vector3(2000f, 2000f);
     mCardEvent = new GetCardInvenEvent(ReceivedCard);
     NetMgr.GetCardInven(mCardEvent);
 }
 public void Init(CardInfo targetCard)
 {
     mTargetCard = targetCard;
     transform.gameObject.SetActive(true);
     transform.localPosition = new Vector3(2000f, 2000f);
     mCardEvent = new GetCardInvenEvent(ReceivedCard);
     NetMgr.GetCardInven(mCardEvent);
 }
示例#3
0
    void ReceivedExpand()
    {
        //		DialogueMgr.ShowDialogue(mExpandEvent.Response.data.userInvenOfCard
        if(mExpandEvent.Response.code == 0)
            UserMgr.LobbyInfo.userInvenOfCard = mExpandEvent.Response.data.userInvenOfCard;

        mCardEvent = new GetCardInvenEvent(ReceivedCards);
        NetMgr.GetCardInven(mCardEvent);
    }
示例#4
0
    void ReceivedExpand()
    {
//		DialogueMgr.ShowDialogue(mExpandEvent.Response.data.userInvenOfCard
        if (mExpandEvent.Response.code == 0)
        {
            UserMgr.LobbyInfo.userInvenOfCard = mExpandEvent.Response.data.userInvenOfCard;
        }

        mCardEvent = new GetCardInvenEvent(ReceivedCards);
        NetMgr.GetCardInven(mCardEvent);
    }
示例#5
0
    public void GotProfile()
    {
        UserMgr.UserInfo = mProfileEvent.Response.data;

        //    if (UserMgr.UserInfo!= null) {
        string images = Constants.IMAGE_SERVER_HOST + UserMgr.UserInfo.imagePath + UserMgr.UserInfo.imageName;

        Debug.Log("UserMgr.UserInfo.imageName : " + UserMgr.UserInfo.imageName);

        if (UserMgr.UserInfo.imageName != "")
        {
            WWW www = new WWW(images);
            StartCoroutine(GetImage(www));
        }
        else if (UserMgr.UserInfo.imageName == UserMgr.UserInfo.memberEmail ||
                 UserMgr.UserInfo.imageName == "")
        {
            UserMgr.UserInfo.Textures = null;
        }

        if (mProfileEvent.Response.message != null &&
            mProfileEvent.Response.message.Length > 0)
        {
            //            UtilMgr.OnBackPressed();

            DialogueMgr.ShowDialogue(mJoinError, mProfileEvent.Response.message,
                                     DialogueMgr.DIALOGUE_TYPE.Alert, "", "", "", null);

            return;
        }

        Debug.Log("UserMgr.UserInfo.activeAuth is " + UserMgr.UserInfo.activeAuth);
        //Check Auth
        //        if(UserMgr.UserInfo.activeAuth < 1){
        //            OpenCert();
        //            return;
        //        }

        Debug.Log("UserMgr.UserInfo.GetTeamCode() : " + UserMgr.UserInfo.GetTeamCode());

        //        if (mLoginInfo != null) {
        //            UserMgr.UserInfo.teamCode = mLoginInfo.teamCode;
        //            UserMgr.UserInfo.teamSeq = mLoginInfo.teamSeq;
        //
        //            Debug.Log("2 UserMgr.UserInfo.GetTeamCode() : "+UserMgr.UserInfo.GetTeamCode());
        //        }

        Debug.Log("GotProfile");
        mCardEvent = new GetCardInvenEvent(new EventDelegate(this, "GotCardInven"));
        NetMgr.GetCardInven(mCardEvent);


        //}
    }
示例#6
0
    void ReceivedPlayers()
    {
        UserMgr.PlayerList = mPlayerEvent.Response.data;
        UserMgr.PlayerDic  = new System.Collections.Generic.Dictionary <long, PlayerInfo>();
        foreach (PlayerInfo info in UserMgr.PlayerList)
        {
            UserMgr.PlayerDic.Add(info.playerId, info);
        }

        mCardEvent = new GetCardInvenEvent(ReceivedCards);
        NetMgr.GetCardInven(mCardEvent);
    }
示例#7
0
 public void GotProfile()
 {
     UserMgr.UserInfo = mProfileEvent.Response.data;
     if (mLoginInfo != null)
     {
         UserMgr.UserInfo.teamCode = mLoginInfo.teamCode;
         UserMgr.UserInfo.teamSeq  = mLoginInfo.teamSeq;
     }
     Debug.Log("GotProfile");
     mCardEvent = new GetCardInvenEvent(new EventDelegate(this, "GotCardInven"));
     NetMgr.GetCardInven(mCardEvent);
 }
示例#8
0
    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 OnClick()
 {
     if(name.Equals("BtnMyCards")){
         mCardEvent = new GetCardInvenEvent(ReceivedCards);
         NetMgr.GetCardInven(mCardEvent);
     } else if(name.Equals("BtnUpcoming")){
         mContestEvent = new ContestDataEvent(ReceivedUpcoming);
         NetMgr.GetContestData(ContestListInfo.STATUS_UP, mContestEvent);
     } else if(name.Equals("BtnLive")){
         mContestEvent = new ContestDataEvent(ReceivedLive);
         NetMgr.GetContestData(ContestListInfo.STATUS_LIVE, mContestEvent);
     } else if(name.Equals("BtnRecent")){
         mContestEvent = new ContestDataEvent(ReceivedRecent);
         NetMgr.GetContestData(ContestListInfo.STATUS_RECENT, mContestEvent);
     }
 }
示例#10
0
    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();
    }
示例#11
0
 void ReceivedPurchase()
 {
     if(mItemInfo.category == Shop.CARD){
     //			DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrPurchaseSuccess"),
     //			                         string.Format(UtilMgr.GetLocalText("StrPurchaseSuccess2"), mItemInfo.productName)
     //			                         , DialogueMgr.DIALOGUE_TYPE.Alert, CardPurchasedHandler);
         mCardEvent = new GetCardInvenEvent(ReceivedCards);
         NetMgr.GetCardInven(mCardEvent);
     } else if(mItemInfo.category == Shop.TICKET){
         DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrPurchaseSuccess"),
                                  string.Format(UtilMgr.GetLocalText("StrPurchaseSuccess2"), mItemInfo.productName)
                                  , DialogueMgr.DIALOGUE_TYPE.Alert, null);
     } else if(mItemInfo.category == Shop.SKILL){
         DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrPurchaseSuccess"),
                                  string.Format(UtilMgr.GetLocalText("StrPurchaseSuccess2"), mItemInfo.productName)
                                  , DialogueMgr.DIALOGUE_TYPE.Alert, DiagSkill);
     }
     UserMgr.UserInfo.gold -= mItemInfo.price;
 }
示例#12
0
 public void OnClick()
 {
     if (name.Equals("BtnMyCards"))
     {
         mCardEvent = new GetCardInvenEvent(ReceivedCards);
         NetMgr.GetCardInven(mCardEvent);
     }
     else if (name.Equals("BtnUpcoming"))
     {
         mContestEvent = new ContestDataEvent(ReceivedUpcoming);
         NetMgr.GetContestData(ContestListInfo.STATUS_UP, mContestEvent);
     }
     else if (name.Equals("BtnLive"))
     {
         mContestEvent = new ContestDataEvent(ReceivedLive);
         NetMgr.GetContestData(ContestListInfo.STATUS_LIVE, mContestEvent);
     }
     else if (name.Equals("BtnRecent"))
     {
         mContestEvent = new ContestDataEvent(ReceivedRecent);
         NetMgr.GetContestData(ContestListInfo.STATUS_RECENT, mContestEvent);
     }
 }
示例#13
0
    void ReceivedPurchase()
    {
        if (mItemInfo.category == Shop.CARD)
        {
//			DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrPurchaseSuccess"),
//			                         string.Format(UtilMgr.GetLocalText("StrPurchaseSuccess2"), mItemInfo.productName)
//			                         , DialogueMgr.DIALOGUE_TYPE.Alert, CardPurchasedHandler);
            mCardEvent = new GetCardInvenEvent(ReceivedCards);
            NetMgr.GetCardInven(mCardEvent);
        }
        else if (mItemInfo.category == Shop.TICKET)
        {
            DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrPurchaseSuccess"),
                                     string.Format(UtilMgr.GetLocalText("StrPurchaseSuccess2"), mItemInfo.productName)
                                     , DialogueMgr.DIALOGUE_TYPE.Alert, null);
        }
        else if (mItemInfo.category == Shop.SKILL)
        {
            DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrPurchaseSuccess"),
                                     string.Format(UtilMgr.GetLocalText("StrPurchaseSuccess2"), mItemInfo.productName)
                                     , DialogueMgr.DIALOGUE_TYPE.Alert, DiagSkill);
        }
        UserMgr.UserInfo.gold -= mItemInfo.price;
    }
示例#14
0
 void draw_TopPlayer()
 {
     mCardEvent = new GetCardInvenEvent(ReceivedCards);
     NetMgr.GetCardInven(mCardEvent);
 }
示例#15
0
 void ReloadHandler(DialogueMgr.BTNS btn)
 {
     mCardEvent = new GetCardInvenEvent(ReceivedCards);
     NetMgr.GetCardInven(mCardEvent);
 }
示例#16
0
 void ReloadInven(DialogueMgr.BTNS btn)
 {
     mInvenEvent = new GetCardInvenEvent(ReceivedInven);
     NetMgr.GetCardInven(mInvenEvent);
 }
示例#17
0
 void draw_TopPlayer()
 {
     mCardEvent = new GetCardInvenEvent(ReceivedCards);
     NetMgr.GetCardInven(mCardEvent);
 }
示例#18
0
 void ReloadInven(DialogueMgr.BTNS btn)
 {
     mInvenEvent = new GetCardInvenEvent(ReceivedInven);
     NetMgr.GetCardInven(mInvenEvent);
 }
 void Start()
 {
     mEvent = new GetCardInvenEvent(new EventDelegate(this, "GotCardsInven"));
     NetMgr.GetCardInven(mEvent);
 }
示例#20
0
 void ReloadHandler(DialogueMgr.BTNS btn)
 {
     mCardEvent = new GetCardInvenEvent(ReceivedCards);
     NetMgr.GetCardInven(mCardEvent);
 }