Пример #1
0
 public void ResetInBackground()
 {
     //데이터 새로고침
     //NomalContest.cs에서 사용
     CDE = new ContestDataEvent(new EventDelegate(this, "ResetNCData"));
     NetMgr.GetContestDataInBackground(CDE);
 }
Пример #2
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);
     }
 }
Пример #3
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);
     }
 }
Пример #4
0
 //프리셋 등록,삭제
 public void Button()
 {
     if (this.name == "Close")
     {
         DialogueMgr.ShowDialogue("등록 취소", "기존 등록된 내용을 잃을 수 있습니다.", DialogueMgr.DIALOGUE_TYPE.YesNo, "등록 취소", "계속 등록", "", DialogueHandler);
     }
     else if (this.name == "Menu 0")
     {
         ResetPreset();
     }
     else if (this.name == "Menu 1")
     {
         RandomPreset();
     }
     else if (this.name == "Menu 2")
     {
     }
     else if (this.name == "Remove")
     {
         DialogueMgr.ShowDialogue("프리셋 삭제", "기존 등록된 프리셋이 삭제됩니다.", DialogueMgr.DIALOGUE_TYPE.YesNo, "프리셋 삭제", "삭제 취소", "", RemovePreset);
     }
     else
     {
         if (transform.parent.parent.parent.GetComponent <PreSettingCommander>().Mode == "Update")
         {
             //	Debug.Log(transform.parent.parent.parent.GetComponent<PreSettingCommander>().Mode);
             DialogueMgr.ShowDialogue("예측 완료", "사전 경기 예측 완료!", DialogueMgr.DIALOGUE_TYPE.Alert, "", "", "등록", register);
             mNeedMove = true;
         }
         else
         {
             CDE = new ContestDataEvent(new EventDelegate(this, "MaxCheck"));
             NetMgr.GetContestData(CDE);
         }
     }
 }
Пример #5
0
    public void Init(string title, ContestDataEvent contestEvent)
    {
        mList = contestEvent.Response.data;
        transform.gameObject.SetActive(true);
        transform.localPosition = new Vector3(1000f, 0);
        transform.FindChild("Top").FindChild("LblTitle").GetComponent <UILabel>().text = title;

        int  totalTickets    = 0;
        long totalEarnedRP   = 0;
        long totalEarnedGold = 0;
        long total1stPrize   = 0;

        foreach (ContestListInfo info in mList)
        {
            totalTickets    += info.entryTicket;
            totalEarnedRP   += info.myRewardRP;
            totalEarnedGold += info.myRewardGold;
            total1stPrize   += info.firstRewardGold;
        }

        UtilMgr.ClearList(transform.FindChild("Body").FindChild("Scroll View"));        //,
//		                  Vector2.zero, new Vector3(0, -118f, 0));

        if (title.Equals(UtilMgr.GetLocalText("LblUpcomingContests")))
        {
            transform.FindChild("Top").FindChild("Upcoming").gameObject.SetActive(true);
            transform.FindChild("Top").FindChild("Live").gameObject.SetActive(false);
            transform.FindChild("Top").FindChild("Recent").gameObject.SetActive(false);

            transform.FindChild("Top").FindChild("Upcoming").FindChild("Entries").FindChild("LblEntriesV")
            .GetComponent <UILabel>().text = contestEvent.Response.data.Count + "";
            transform.FindChild("Top").FindChild("Upcoming").FindChild("EntryFees").FindChild("LblEntryFeesV")
            .GetComponent <UILabel>().text = totalTickets + "";

            InitUpcomingList();
        }
        else if (title.Equals(UtilMgr.GetLocalText("LblLive")))
        {
            transform.FindChild("Top").FindChild("Upcoming").gameObject.SetActive(false);
            transform.FindChild("Top").FindChild("Live").gameObject.SetActive(true);
            transform.FindChild("Top").FindChild("Recent").gameObject.SetActive(false);

            transform.FindChild("Top").FindChild("Live").FindChild("Entries").FindChild("LblEntriesV")
            .GetComponent <UILabel>().text = contestEvent.Response.data.Count + "";
            transform.FindChild("Top").FindChild("Live").FindChild("EntryFees").FindChild("LblEntryFeesV")
            .GetComponent <UILabel>().text = totalTickets + "";
            transform.FindChild("Top").FindChild("Live").FindChild("Winnings").FindChild("LblWinningsV")
            .GetComponent <UILabel>().text = total1stPrize + "G";

            InitLiveList();
        }
        else
        {
            transform.FindChild("Top").FindChild("Upcoming").gameObject.SetActive(false);
            transform.FindChild("Top").FindChild("Live").gameObject.SetActive(false);
            transform.FindChild("Top").FindChild("Recent").gameObject.SetActive(true);

            transform.FindChild("Top").FindChild("Recent").FindChild("EntryFees").FindChild("LblEntryFeesV")
            .GetComponent <UILabel>().text = totalEarnedRP + "RP";
            transform.FindChild("Top").FindChild("Recent").FindChild("Winnings").FindChild("LblWinningsV")
            .GetComponent <UILabel>().text = totalEarnedGold + "G";

            InitRecentList();
        }

        InitEnded();
    }
Пример #6
0
 public void Reset()
 {
     CDE = new ContestDataEvent(new EventDelegate(this, "ResetNCData"));
     NetMgr.GetContestData(CDE);
 }