public static ObjectPaging CreatePagingPanel(GameObject Uipanel, GameObject Uigrid, GameObject CreateObj, int _CreateCount, int FirstCreateCount, int MaxCreateCount, float BottomLimit, System.Action <int, GameObject> _CallBack, eScrollType _ScrollType = eScrollType.Vertical, bool _NotUpdate = false)
    {
        ObjectPaging objectPaging = Uipanel.AddComponent <ObjectPaging>();

        objectPaging.Setup(Uipanel, CreateObj, Uigrid, _CreateCount, FirstCreateCount, MaxCreateCount, BottomLimit, _CallBack, _ScrollType, _NotUpdate);
        return(objectPaging);
    }
Example #2
0
    public override void Init()
    {
        SceneManager.instance.sw.Reset();
        SceneManager.instance.sw.Start();
        SceneManager.instance.showStopWatchTimer("Ranking panel, Init() start");

        base.Init();

        CharInven = NetData.instance.GetUserInfo();

        _ObjectPaging = ObjectPaging.CreatePagingPanel(Scroll.gameObject, Grid.gameObject, Grid.transform.GetChild(0).gameObject, 1,
                                                       5, 0, 0, (i, go) => {
            List <NetData.RankInfo> list = null;
            if (RankingList.TryGetValue(CurRankType, out list))
            {
                if (list != null && i < list.Count)
                {
                    go.SetActive(true);
                    SetSlot(go.transform, list[i]);
                }
                else
                {
                    go.SetActive(false);
                }
            }
        });

        Destroy(Grid.transform.GetChild(0).gameObject);

        TabGroup.Initialize(OnClickTab);
        //Scroll.enabled = true;
        for (int i = 0; i < MinorTabTf.childCount; i++)
        {
            int type = i;
            EventDelegate.Set(MinorTabTf.GetChild(i).GetComponent <UIEventTrigger>().onClick, delegate() { CallBackMinor(type); });
        }

        EventDelegate.Set(GuildPopGo.transform.FindChild("BtnClose").GetComponent <UIEventTrigger>().onClick, Hide);//길드 정보 팝업 닫기
        SceneManager.instance.showStopWatchTimer("Ranking panel, Init() finish");
    }
    public override void LateInit()
    {
        base.LateInit();
        // 길드기본정보/상세정보를 미리받아놈
        NetworkClient.instance.SendPMsgGuildQueryBaseInfoC(MyGuildId);
        NetworkClient.instance.SendPMsgGuildQueryDetailedInfoC(MyGuildId);
        NetworkClient.instance.SendPMsgGuildQuerySelfInfoC(MyGuildId);

        // 아이콘
        GameObject markPrefab = MarkTf.GetChild(0).gameObject;

        MarkPaging = ObjectPaging.CreatePagingPanel(MarkTf.parent.gameObject, MarkTf.gameObject, markPrefab
                                                    , 5, 32, 32, 10, OnCallBackMark);//가라 522개

        Destroy(markPrefab);

        DeclareInput.gameObject.SetActive(false);
        NoticeInput.gameObject.SetActive(false);
        NameInput.gameObject.SetActive(false);

        Alram.SetActive(SceneManager.instance.IsAlram((AlramIconType.GUILD)));
    }
    public override void Init()
    {
        base.Init();
        CharInven = NetData.instance.GetUserInfo();

        UIHelper.CreateEffectInGame(PnTouchEff[0].transform, "Fx_UI_partner_select_01");
        UIHelper.CreateEffectInGame(PnTouchEff[1].transform, "Fx_UI_partner_select_01");

        SetPvpReadyPopup();
        PvpReadyPopup.SetActive(true);
        BattleRecordPopup.SetActive(false);
        RewardListPopup.SetActive(false);
        RankPopup.SetActive(false);

        //vip레벨에따른 리셋최대수치
        List <Vip.VipDataInfo> VipInfo = _LowDataMgr.instance.GetLowDataVipData(NetData.instance.GetUserInfo()._VipLevel);

        for (int i = 0; i < VipInfo.Count; i++)
        {
            if (VipInfo[i].type == 12)
            {
                ResetMaxCount = (int)VipInfo[i].Typevalue;
                break;
            }
        }

        for (int i = 0; i < 15; i++)
        {
            GameObject slotGo = Instantiate(PvpSlotPrefab) as GameObject;
            Transform  slotTf = slotGo.transform;
            slotTf               = slotGo.transform;
            slotTf.parent        = PvpGrid.transform;
            slotTf.localPosition = Vector3.zero;
            slotTf.localScale    = Vector3.one;
            slotTf.gameObject.SetActive(false);
        }
        Destroy(PvpSlotPrefab);


        BuyBtn.gameObject.SetActive(false);
        BuyBtn.transform.FindChild("Txt_buy").GetComponent <UILabel>().text = _LowDataMgr.instance.GetEtcTableValue <uint>(EtcID.PvPcashvalue).ToString();
        BtnEvents();

        transform.FindChild("PvpPanel/class").GetComponent <UISprite>().spriteName = UIHelper.GetClassIcon(CharInven._userCharIndex);

        RankPaging = ObjectPaging.CreatePagingPanel(RankGrid.transform.parent.gameObject, RankGrid.gameObject, RankingSlotPrefab, 1, 4, 4, 0, OnRankSlotdelegate);
        Destroy(RankingSlotPrefab);

        //EnemyPaging = ObjectPaging.CreatePagingPanel(PvpGrid.transform.parent.gameObject, PvpGrid.gameObject, PvpSlotPrefab, 1, 4, 4, 0, OnMatchListSlotdelegate);
        //Destroy(PvpSlotPrefab);

        //UI바뀌어야함 일단 보류
        List <PVP.PVPAutoRewardInfo> autoList = _LowDataMgr.instance.GetPvpAutoRewardList();

        UIHelper.CreateSlotItem(true, autoList.Count, RewardDailySlotPrefab.transform, RewardDailyGrid.transform, delegate(Transform tf, int arr)
        {
            if (autoList.Count - 1 == arr)                                                                     //마지막
            {
                tf.FindChild("num").GetComponent <UILabel>().text = _LowDataMgr.instance.GetStringCommon(193); //순위권 밖
            }
            else
            {
                if (autoList[arr].RankMin == autoList[arr].RankMax)
                {
                    tf.FindChild("num").GetComponent <UILabel>().text = string.Format(_LowDataMgr.instance.GetStringCommon(192), /*"{0}"*/ autoList[arr].RankMin);
                }
                else
                {
                    string num = string.Format("{0} ~ {1}", autoList[arr].RankMin, autoList[arr].RankMax);
                    tf.FindChild("num").GetComponent <UILabel>().text = string.Format(_LowDataMgr.instance.GetStringCommon(192), num);
                }
            }

            tf.FindChild("value").GetComponent <UILabel>().text = string.Format("{0:#,#}", autoList[arr].RewardValue);
        });

        RewardDailyGrid.repositionNow = true;
        PvpSlotPrefab.SetActive(false);

        NetworkClient.instance.SendPMsgArenaRankInfoC();
        NetworkClient.instance.SendPMsgArenaInfoC();
    }
    /// <summary> StoryModePanel에서 사용해준다. 초기화 함수 최초 1회만 호출함. </summary>
    public void PopupInit(ChapterPanel panel)
    {
        CharInven = NetData.instance.GetUserInfo();
        Chapter   = panel;

        Transform infoTf = PopupObj[(int)POPUP_TYPE.STAGE_INFO].transform;

        EventDelegate.Set(infoTf.FindChild("BtnReady").GetComponent <UIButton>().onClick, delegate() {
            if (0 < CurrentData._StageLowData.DailyEntercount)
            {
                int clearCount = CurrentData._StageLowData.DailyEntercount - CurrentData.DailyClearCount;
                if (clearCount <= 0)//더이상 진행 불가능
                {
                    UIMgr.instance.AddErrorPopup((int)Sw.ErrorCode.ER_StageStartS_Daily_Time_Error);
                    return;
                }
            }


            UIMgr.OpenReadyPopup(GAME_MODE.SINGLE, UIMgr.GetUIBasePanel("UIPanel/ChapterPanel"), CurrentData.NeedEnerge, 0);
            DisablePopup();
        });

        EventDelegate.Set(infoTf.FindChild("BtnStart").GetComponent <UIButton>().onClick, delegate() {
            panel.GotoInGame();
        });

        EventDelegate.Set(transform.FindChild("StageInfoView/BtnClose").GetComponent <UIButton>().onClick, () => {
            OnClosePopup();
        });

        EventDelegate.Set(transform.FindChild("SweepPopup/BtnClose").GetComponent <UIButton>().onClick, () => {
            OnClosePopup();
        });

        EventDelegate.Set(BtnSweep.GetComponent <UIButton>().onClick, OnClickSweep);
        EventDelegate.Set(SweepCardToggle.onChange, OnToggleAutoFlop);

        DisablePopup();

        Transform sweepTf = PopupObj[(int)POPUP_TYPE.SWEEP].transform;

        EventDelegate.Set(sweepTf.FindChild("Info/BtnOneSweep").GetComponent <UIButton>().onClick, delegate() { OnClickBtnSweep(1); });
        EventDelegate.Set(sweepTf.FindChild("Info/BtnFiveSweep").GetComponent <UIButton>().onClick, delegate() { OnClickBtnSweep(5); });

        EventDelegate.Set(MoveStage[0].GetComponent <UIButton>().onClick, delegate() { OnClickMoveState(-1); });
        EventDelegate.Set(MoveStage[1].GetComponent <UIButton>().onClick, delegate() { OnClickMoveState(1); });

        Transform slotParentTf = infoTf.FindChild("Left/DropItem");

        InvenSlot = new InvenItemSlotObject[4];
        for (int i = 0; i < 4; i++)
        {
            GameObject go = UIHelper.CreateInvenSlot(slotParentTf.FindChild(string.Format("{0}", i)));
            InvenSlot[i] = go.GetComponent <InvenItemSlotObject>();
        }


        sweepTf.FindChild("Info/BtnOneSweep/label").GetComponent <UILabel>().text  = string.Format(_LowDataMgr.instance.GetStringCommon(297), 1);
        sweepTf.FindChild("Info/BtnFiveSweep/label").GetComponent <UILabel>().text = string.Format(_LowDataMgr.instance.GetStringCommon(297), 10);

        Transform[] root = new Transform[] {
            SweepItemPrefab.transform.FindChild("ItemRoot_0"),
            SweepItemPrefab.transform.FindChild("ItemRoot_1"),
            SweepItemPrefab.transform.FindChild("ItemRoot_2"),
            SweepItemPrefab.transform.FindChild("ItemRoot_3"),
            SweepItemPrefab.transform.FindChild("CardItemRoot_0"),
            SweepItemPrefab.transform.FindChild("CardItemRoot_1")
        };

        for (int i = 0; i < root.Length; i++)
        {
            GameObject go = Instantiate(InvenSlotPrefab) as GameObject;
            go.transform.parent        = root[i];
            go.transform.localScale    = Vector3.one;
            go.transform.localPosition = Vector3.zero;

            go.collider.enabled = false;
        }

        Transform scrollTf = transform.FindChild("SweepPopup/ScrollParent/Scroll");

        SweepPaging = ObjectPaging.CreatePagingPanel(scrollTf.gameObject, scrollTf.GetChild(0).gameObject, SweepItemPrefab, 1, 4, 4, 0, OnCallBackSweepSlot);
        SweepItemPrefab.SetActive(false);

        //StageActionPanel.clipOffset = new Vector2(ActionFromIdx, 0);
        StageActions            = transform.FindChild("StageInfoView").GetComponents <TweenScale>();
        StageActions[0].enabled = false;
        StageActions[1].enabled = false;

        SweepActions            = transform.FindChild("SweepPopup").GetComponents <TweenScale>();
        SweepActions[0].enabled = false;
        SweepActions[1].enabled = false;

        if (SceneManager.instance.testData.bQuestTestStart)
        {
            TempCoroutine.instance.FrameDelay(2.0f, () => {
                panel.GotoInGame();
            });
        }
    }
    public override void Init()
    {
        base.Init();

        EventDelegate.Set(ToggleFreeJoin.onChange, OnToggleFreeJoin);

        Transform prefab = ListTf.GetChild(0);

        prefab.gameObject.SetActive(false);
        for (int i = 0; i < 9; i++)
        {
            Transform tf = Instantiate(prefab) as Transform;
            tf.parent        = ListTf;
            tf.localPosition = Vector3.zero;
            tf.localScale    = Vector3.one;
        }

        ListTf.GetComponent <UIGrid>().repositionNow = true;

        Transform Rprefab = RankTf.GetChild(0);

        Rprefab.gameObject.SetActive(false);
        for (int i = 0; i < 100; i++)
        {
            Transform tf = Instantiate(Rprefab) as Transform;
            tf.parent        = RankTf;
            tf.localPosition = Vector3.zero;
            tf.localScale    = Vector3.one;
        }

        RankTf.GetComponent <UIGrid>().repositionNow = true;

        GameObject markPrefab = MarkTf.GetChild(0).gameObject;

        ObjectPaging.CreatePagingPanel(MarkTf.parent.gameObject, MarkTf.gameObject, markPrefab
                                       , 5, 32, 32, 10, OnCallBackMark);//가라 522개

        Destroy(markPrefab);


        //무료
        string val = string.Format(_LowDataMgr.instance.GetStringCommon(232), SceneManager.instance.NumberToString(_LowDataMgr.instance.GetEtcTableValue <int>(EtcID.GuildCost2)));

        Popup [0].transform.FindChild("Make/BtnCreateGold/Btn_on/label").GetComponent <UILabel> ().text  = val;
        Popup [0].transform.FindChild("Make/BtnCreateGold/Btn_off/label").GetComponent <UILabel> ().text = val;

        bool create = NetData.instance.GetAsset(AssetType.Gold) < (ulong)_LowDataMgr.instance.GetEtcTableValue <int>(EtcID.GuildCost2) ? false: true;

        Popup[0].transform.FindChild("Make/BtnCreateGold/Btn_on").gameObject.SetActive(create);
        Popup[0].transform.FindChild("Make/BtnCreateGold/Btn_off").gameObject.SetActive(!create);


        EventDelegate.Set(Popup[0].transform.FindChild("Make/BtnCreateGold").GetComponent <UIEventTrigger>().onClick, delegate() {//길드 생성 버튼 클릭.
            ulong needValue = _LowDataMgr.instance.GetEtcTableValue <ulong>(EtcID.GuildCost2);
            if (NetData.instance.GetAsset(AssetType.Gold) < needValue)
            {
                SetClickPopup(443, null, null);
            }
            else if (string.IsNullOrEmpty(CreateName.value)) //길드 이름 확인
            {
                SetClickPopup(237, null, null);
            }
            else if (string.IsNullOrEmpty(CreateDesc.value))//선언 확인
            {
                SetClickPopup(238, null, null);
            }
            else if (IconID <= 0)
            {
                SetClickPopup(239, null, null);
            }
            else //모든란 입력했음.
            {
                //금칙어는 XXX로 나옴
                //string name = CreateName.value;
                //_LowDataMgr.instance.IsBanString(ref name);

                if (_LowDataMgr.instance.IsBanString(CreateName.value))
                {
                    uiMgr.AddPopup(141, 898, 117);
                    return;
                }

                string dec = CreateDesc.value;
                _LowDataMgr.instance.IsBanString(ref dec);
                string noti = CreateNoti.value;
                _LowDataMgr.instance.IsBanString(ref noti);

                //if (_LowDataMgr.instance.IsBanString(CreateName.value))
                //{
                //    uiMgr.AddPopup(141, 898, 117);
                //    return;
                //}
                //if (_LowDataMgr.instance.IsBanString(CreateDesc.value))
                //{
                //    uiMgr.AddPopup(141, 898, 117);
                //    return;
                //}
                //if (_LowDataMgr.instance.IsBanString(CreateNoti.value))
                //{
                //    uiMgr.AddPopup(141, 898, 117);
                //    return;
                //}

                SetClickPopup(236, SceneManager.instance.NumberToString(needValue), () => {                 //SetClickPopup(236, needValue.ToString("#,##"), () => {
                    NetworkClient.instance.SendPMsgGuildCreateNewC(IconID, CreateName.value, dec, 2, 2);
                    //IsCreateGuild = true;
                });
            }
        });
        //유료
        //string val2 = string.Format(_LowDataMgr.instance.GetStringCommon(231), _LowDataMgr.instance.GetEtcTableValue<int>(EtcID.GuildCost1).ToString("#,##"));
        string val2 = string.Format(_LowDataMgr.instance.GetStringCommon(231), SceneManager.instance.NumberToString(_LowDataMgr.instance.GetEtcTableValue <int>(EtcID.GuildCost1)));

        Popup[0].transform.FindChild("Make/BtnCreateCash/Btn_on/label").GetComponent <UILabel>().text  = val2;
        Popup[0].transform.FindChild("Make/BtnCreateCash/Btn_off/label").GetComponent <UILabel>().text = val2;


        bool create_ = NetData.instance.GetAsset(AssetType.Gold) < (ulong)_LowDataMgr.instance.GetEtcTableValue <int>(EtcID.GuildCost1) ? false : true;

        Popup[0].transform.FindChild("Make/BtnCreateCash/Btn_on").gameObject.SetActive(create_);
        Popup[0].transform.FindChild("Make/BtnCreateCash/Btn_off").gameObject.SetActive(!create_);



        EventDelegate.Set(Popup[0].transform.FindChild("Make/BtnCreateCash").GetComponent <UIEventTrigger>().onClick, delegate() {//길드 생성 버튼 클릭.
            ulong needValue = _LowDataMgr.instance.GetEtcTableValue <ulong>(EtcID.GuildCost1);
            if (NetData.instance.GetAsset(AssetType.Cash) < needValue)
            {
                SetClickPopup(376, null, null);
            }
            else if (System.Text.ASCIIEncoding.Unicode.GetByteCount(CreateName.value) > 24)  //길드이름 글자수제한
            {
            }
            else if (string.IsNullOrEmpty(CreateName.value))//길드 이름 확인
            {
                SetClickPopup(237, null, null);
            }
            else if (string.IsNullOrEmpty(CreateDesc.value))//선언 확인
            {
                SetClickPopup(238, null, null);
            }
            else if (IconID <= 0)
            {
                SetClickPopup(239, null, null);
            }

            else //모든란 입력했음.
            {
                //금칙어
                //string name = CreateName.value;
                //_LowDataMgr.instance.IsBanString(ref name);

                if (_LowDataMgr.instance.IsBanString(CreateName.value))
                {
                    uiMgr.AddPopup(141, 898, 117);
                    return;
                }
                string dec = CreateDesc.value;
                _LowDataMgr.instance.IsBanString(ref dec);
                string noti = CreateNoti.value;
                _LowDataMgr.instance.IsBanString(ref noti);
                //if (_LowDataMgr.instance.IsBanString(CreateName.value))
                //{
                //    uiMgr.AddPopup(141, 898, 117);
                //    return;
                //}
                //if (_LowDataMgr.instance.IsBanString(CreateDesc.value))
                //{
                //    uiMgr.AddPopup(141, 898, 117);
                //    return;
                //}
                //if (_LowDataMgr.instance.IsBanString(CreateNoti.value))
                //{
                //    uiMgr.AddPopup(141, 898, 117);
                //    return;
                //}

                SetClickPopup(235, SceneManager.instance.NumberToString(needValue), () => {                 //SetClickPopup(235, needValue.ToString("#,##"), ()=> {
                    NetworkClient.instance.SendPMsgGuildCreateNewC(IconID, CreateName.value, dec, 2, 1);
                    //IsCreateGuild = true;
                });
            }
        });

        //다음버튼 ( 휘장선택후 다시 생성화면으로 넘어감)
        EventDelegate.Set(Popup[0].transform.FindChild("Select/BtnCreate").GetComponent <UIEventTrigger>().onClick, delegate() {
            if (!CheckLevel)
            {
                SetClickPopup(945, _LowDataMgr.instance.GetEtcTableValue <string>(EtcID.GuildCondition), null);
            }
            else
            {
                //CreateGuild();
                if (0 < IconID)
                {
                    CreateGuild();
                }
                else//길드 마크를 선택하지 않음.
                {
                    SetClickPopup(239, null, null);
                }
            }
        });

        //휘장마크 선택팝업 끄기
        EventDelegate.Set(Popup[0].transform.FindChild("BtnClose").GetComponent <UIEventTrigger>().onClick, () => {
            ActivePopups(99);
            IconID = 0;
        });

        //메인팝업
        EventDelegate.Set(Popup[1].transform.FindChild("BtnClose").GetComponent <UIEventTrigger>().onClick, () => {
            ActivePopups(99);
            uiMgr.SetTopMenuTitleName(215);
        });

        //메세지 팝업
        EventDelegate.Set(Popup[2].transform.FindChild("BtnCancel").GetComponent <UIEventTrigger>().onClick, () => {
            Popup[2].SetActive(false);
        });

        //길드 생성 버튼
        transform.FindChild("BtnCreate/Btn_on/bg").GetComponent <UISprite>().spriteName = CheckLevel ? "Btn_Blue02" : "Btn_Blue02Dis";
        EventDelegate.Set(transform.FindChild("BtnCreate").GetComponent <UIEventTrigger>().onClick, () => {
            if (!CheckLevel)
            {
                SetClickPopup(945, _LowDataMgr.instance.GetEtcTableValue <string>(EtcID.GuildCondition), null);
                return;
            }

            //던에따라..ㅇㄹㅇㄹ
            bool createCash  = NetData.instance.GetAsset(AssetType.Cash) >= _LowDataMgr.instance.GetEtcTableValue <ulong>(EtcID.GuildCost1);
            bool createMoney = NetData.instance.GetAsset(AssetType.Gold) >= _LowDataMgr.instance.GetEtcTableValue <ulong>(EtcID.GuildCost2);

            Popup[0].transform.FindChild("Make/BtnCreateCash/Btn_on").gameObject.SetActive(createCash);
            Popup[0].transform.FindChild("Make/BtnCreateCash/Btn_off").gameObject.SetActive(!createCash);

            Popup[0].transform.FindChild("Make/BtnCreateGold/Btn_on").gameObject.SetActive(createMoney);
            Popup[0].transform.FindChild("Make/BtnCreateGold/Btn_off").gameObject.SetActive(!createMoney);

            ActivePopups(0);

            //여기서 생성화면으로 ..
            Popup[0].transform.FindChild("Select").gameObject.SetActive(false);
            Popup[0].transform.FindChild("Make").gameObject.SetActive(true);

            CreateName.value = CreateName.label.text = "";
            CreateDesc.value = CreateDesc.label.text = "";
            CreateNoti.value = CreateNoti.label.text = "";

            Popup[0].transform.FindChild("Make/Txt_master").GetComponent <UILabel>().text = NetData.instance.GetUserInfo()._charName;//내 캐릭이 길드장이 됨.


            IconID = 0;
            Popup[0].transform.FindChild("Make/Guildmark/icon").GetComponent <UISprite>().spriteName = "";
            UIEventTrigger etri = Popup[0].transform.FindChild("Make/Guildmark/icon").GetComponent <UIEventTrigger>();
            EventDelegate.Set(etri.onClick, delegate()
            {
                for (int i = 0; i < MarkTf.childCount; i++)
                {
                    GameObject sel = MarkTf.GetChild(i).FindChild("Cover").gameObject;
                    sel.SetActive(false);
                }

                //휘장선택창
                Popup[0].transform.FindChild("Select").gameObject.SetActive(true);
                Popup[0].transform.FindChild("Make").gameObject.SetActive(false);
            });
        });

        //검색
        EventDelegate.Set(transform.FindChild("Search/Btn_search").GetComponent <UIEventTrigger>().onClick, () => {
            Debug.Log("SearchGuild Name = " + SearchGuild.value);
            RecommendList.Clear();
            NetworkClient.instance.SendPMsgGuildSearchGuildC(SearchGuild.value);
        });

        //다시 재검색
        EventDelegate.Set(transform.FindChild("Search/Btn_reset").GetComponent <UIEventTrigger>().onClick, () => {
            for (int j = 0; j < ListTf.childCount; j++)
            {
                ListTf.GetChild(j).transform.FindChild("Cover").gameObject.SetActive(false);
            }

            if (TabObj[1].activeSelf)//추천길드 리스트
            {
                NetworkClient.instance.SendPMsgGuildRecommendListC();
            }
        });

        SearchGuild.label.text = SearchGuild.value = "";
        NotFoundGuildName.text = "";
        CreateName.value       = CreateName.label.text = "";
        CreateDesc.value       = CreateDesc.label.text = "";
        CreateNoti.value       = CreateNoti.label.text = "";

        ActivePopups(99); //전부끄기

        if (CheckLevel)   //레벨이 부족할 경우 무시.(신청한것이 없을 테니까)
        {
            NetworkClient.instance.SendPMsgGuildQueryGuildListC();
        }

        UITabGroup tabGroup = transform.FindChild("TabBtnList").GetComponent <UITabGroup>();

        tabGroup.Initialize(delegate(int arr) {
            for (int i = 0; i < TabObj.Length; i++)
            {
                TabObj[i].SetActive(i == arr);
            }

            if (arr == 0)//랭킹
            {
                RankingList.Clear();
                NetworkClient.instance.SendPMsgRankGuildQueryC((int)Sw.RANK_TYPE.RANK_TYPE_GUILD_LEVEL);
            }
            else if (arr == 1)//길드 리스트
            {
                NetworkClient.instance.SendPMsgGuildRecommendListC();
            }
        });
    }