public override void init()
        {
            getComponentByPath <Text>("tabs/shuxing/Text").text = ContMgr.getCont("a3_summon_new_0");
            getComponentByPath <Text>("tabs/xilian/Text").text  = ContMgr.getCont("a3_summon_new_1");
            getComponentByPath <Text>("tabs/shouhun/Text").text = ContMgr.getCont("a3_summon_new_2");
            getComponentByPath <Text>("tabs/ronghe/Text").text  = ContMgr.getCont("a3_summon_new_3");
            getComponentByPath <Text>("tabs/tunshi/Text").text  = ContMgr.getCont("a3_summon_new_4");
            getComponentByPath <Text>("tabs/tujian/Text").text  = ContMgr.getCont("a3_summon_new_5");
            getComponentByPath <Text>("tabs/lianxie/Text").text = ContMgr.getCont("a3_summon_new_6");

            getInstance = this;
            model       = A3_SummonModel.getInstance();
            contents    = this.transform.FindChild("contents");
            Btns        = this.transform.FindChild("tabs");
            summonlist  = this.transform.FindChild("summonlist");
            summonVeiw  = summonlist.FindChild("summons/scroll/content");
            //selectframe = summonlist.FindChild("summons/scroll/frame").gameObject;
            smallwinCon = this.transform.FindChild("small_veiw");
            listCount   = this.transform.FindChild("summonlist/num").GetComponent <Text>();
            for (int i = 0; i < Btns.childCount; i++)
            {
                new BaseButton(Btns.GetChild(i)).onClick = (GameObject go) =>
                {
                    onTab(go.name);
                };
            }
            new BaseButton(this.transform.FindChild("btn_close")).onClick = (GameObject go) =>
            {
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_SUMMON_NEW);
            };
            scrollControler = new ScrollControler();
            ScrollRect scroll = transform.FindChild("summonlist/summons/scroll").GetComponent <ScrollRect>();

            scrollControler.create(scroll);
        }
示例#2
0
        public override void init()
        {
            scrollControer0 = new ScrollControler();
            scrollControer0.create(getComponentByPath <ScrollRect>("con_page/view"));


            instan = this;
            inText();
            achModel = A3_AchievementModel.getInstance();

            conTypeTab = this.getTransformByPath("con_tab");

            conPage  = this.getTransformByPath("con_page/view/con");
            tempPage = this.getGameObjectByPath("con_page/tempPage");

            textPoint = this.getComponentByPath <Text>("Text_point/Text_point");

            // btnUpgrade = new BaseButton(this.getTransformByPath("btn_upgrade"));
            //btnUpgrade.onClick = OnUpgradeClick;

            btnLeft          = new BaseButton(this.getTransformByPath("btn_select/btn_left"));
            btnLeft.onClick  = OnLeftClick;
            btnRight         = new BaseButton(this.getTransformByPath("btn_select/btn_right"));
            btnRight.onClick = OnRightClick;
            textPageIndex    = this.getComponentByPath <Text>("btn_select/bg/Text");

            btnClose         = new BaseButton(this.getTransformByPath("btn_close"));
            btnClose.onClick = OnCloseClick;

            scrollPage = this.getComponentByPath <ScrollRect>("con_page/view");
            //TODO 初始化页面内容
            InitBtnTab();
            base.init();
        }
示例#3
0
        void initUI()
        {
            btWay     = getComponentByPath <Button>("way");
            btNpc     = getComponentByPath <Button>("npc");
            btMonster = getComponentByPath <Button>("monster");
            transCon  = getTransformByPath("con/con");

            if (type == 0)
            {
                btNpc.interactable = false;
            }
            else if (type == 1)
            {
                btMonster.interactable = false;
            }
            else if (type == 2)
            {
                btWay.interactable = false;
            }
            btMonster.onClick.AddListener(onMonsterClick);
            btNpc.onClick.AddListener(onNpcClick);
            btWay.onClick.AddListener(onWayClick);
            itemListView = transform.FindChild("con/con").gameObject;
            item_Parent  = itemListView.GetComponent <GridLayoutGroup>();

            scrollControler = new ScrollControler();
            ScrollRect scroll = transform.FindChild("con").GetComponent <ScrollRect>();

            scrollControler.create(scroll);
        }
示例#4
0
        public ScrollControler newScrollControler(Transform trans)
        {
            ScrollControler scrollControler = new ScrollControler();
            ScrollRect      component       = trans.GetComponent <ScrollRect>();

            scrollControler.create(component, 4);
            return(scrollControler);
        }
	private static int newScrollControler(IntPtr L)
	{
		LuaScriptMgr.CheckArgsCount(L, 2);
		PanelManager panelManager = (PanelManager)LuaScriptMgr.GetUnityObjectSelf(L, 1, "SimpleFramework.Manager.PanelManager");
		Transform trans = (Transform)LuaScriptMgr.GetUnityObject(L, 2, typeof(Transform));
		ScrollControler o = panelManager.newScrollControler(trans);
		LuaScriptMgr.PushObject(L, o);
		return 1;
	}
示例#6
0
        public override void init()
        {
            Debug.LogError("a3_rank2");
            _instance       = this;
            scrollControer0 = new ScrollControler();
            ScrollRect scroll = getComponentByPath <ScrollRect>("panel_top/ScrollRect");

            scrollControer0.create(scroll);
            scrollControer1 = new ScrollControler();
            ScrollRect scroll1 = getComponentByPath <ScrollRect>("panel_centre/now_attributeinfos/Scroll_rect");

            scrollControer1.create(scroll1);
            scrollControer2 = new ScrollControler();
            ScrollRect scroll2 = getComponentByPath <ScrollRect>("panel_centre/next_attributeinfos/Scroll_rect");

            scrollControer2.create(scroll2);
            ach_num    = getComponentByPath <Text>("panel_down/point");
            ruledes    = transform.FindChild("ruledes_bg").gameObject;
            now_image  = getComponentByPath <Image>("panel_centre/now_rankinfos/panel/now/now");
            next_image = getComponentByPath <Image>("panel_centre/now_rankinfos/panel/next/next");
            panel      = transform.FindChild("panel_centre/now_rankinfos/panel/next").gameObject;
            //last_Image = getComponentByPath<Image>("panel_centre/now_rankinfos/Image");
            exp    = getComponentByPath <Text>("panel_centre/exp/Text");
            expimg = getComponentByPath <Slider>("panel_centre/exp");
            onShoeorHideTitileTxt = getComponentByPath <Text>("panel_down/showorhide_btn/Text");

            conatin          = transform.FindChild("panel_top/ScrollRect/Contain").gameObject;
            image            = transform.FindChild("panel_top/ScrollRect/Image").gameObject;
            contain_nowinfo  = transform.FindChild("panel_centre/now_attributeinfos/Scroll_rect/contain").gameObject;
            image_nowinfo    = transform.FindChild("panel_centre/now_attributeinfos/Scroll_rect/Image").gameObject;
            contain_nextinfo = transform.FindChild("panel_centre/next_attributeinfos/Scroll_rect/contain").gameObject;
            image_nextinfo   = transform.FindChild("panel_centre/next_attributeinfos/Scroll_rect/Image").gameObject;
            BaseButton btn_des = new BaseButton(transform.FindChild("panel_down/rule_btn"));

            btn_des.onClick = onShowdes;
            BaseButton btn_desclose = new BaseButton(transform.FindChild("ruledes_bg/ruledes/close"));

            btn_desclose.onClick = onClosedes;
            BaseButton btn_close = new BaseButton(transform.FindChild("close"));

            btn_close.onClick = onClose;
            BaseButton addlv = new BaseButton(transform.FindChild("panel_down/upgrade_btn1"));

            addlv.onClick = onAddLv;
            BaseButton addlv1 = new BaseButton(transform.FindChild("panel_down/upgrade_btn2"));

            addlv1.onClick = onAddLv;
            BaseButton showorhide = new BaseButton(transform.FindChild("panel_down/showorhide_btn"));

            showorhide.onClick = onShoeorHideTitile;
            cteatrve();
            SetSliderValue(0);
        }
示例#7
0
        public override void init()
        {
            a3_rank2._instance   = this;
            this.scrollControer0 = new ScrollControler();
            ScrollRect componentByPath = base.getComponentByPath <ScrollRect>("panel_top/ScrollRect");

            this.scrollControer0.create(componentByPath, 4);
            this.scrollControer1 = new ScrollControler();
            ScrollRect componentByPath2 = base.getComponentByPath <ScrollRect>("panel_centre/now_attributeinfos/Scroll_rect");

            this.scrollControer1.create(componentByPath2, 4);
            this.scrollControer2 = new ScrollControler();
            ScrollRect componentByPath3 = base.getComponentByPath <ScrollRect>("panel_centre/next_attributeinfos/Scroll_rect");

            this.scrollControer2.create(componentByPath3, 4);
            this.ach_num               = base.getComponentByPath <Text>("panel_down/point");
            this.ruledes               = base.transform.FindChild("ruledes_bg").gameObject;
            this.now_image             = base.getComponentByPath <Image>("panel_centre/now_rankinfos/panel/now/now");
            this.next_image            = base.getComponentByPath <Image>("panel_centre/now_rankinfos/panel/next/next");
            this.panel                 = base.transform.FindChild("panel_centre/now_rankinfos/panel/next").gameObject;
            this.exp                   = base.getComponentByPath <Text>("panel_centre/exp/Text");
            this.expimg                = base.getComponentByPath <Slider>("panel_centre/exp");
            this.onShoeorHideTitileTxt = base.getComponentByPath <Text>("panel_down/showorhide_btn/Text");
            this.conatin               = base.transform.FindChild("panel_top/ScrollRect/Contain").gameObject;
            this.image                 = base.transform.FindChild("panel_top/ScrollRect/Image").gameObject;
            this.contain_nowinfo       = base.transform.FindChild("panel_centre/now_attributeinfos/Scroll_rect/contain").gameObject;
            this.image_nowinfo         = base.transform.FindChild("panel_centre/now_attributeinfos/Scroll_rect/Image").gameObject;
            this.contain_nextinfo      = base.transform.FindChild("panel_centre/next_attributeinfos/Scroll_rect/contain").gameObject;
            this.image_nextinfo        = base.transform.FindChild("panel_centre/next_attributeinfos/Scroll_rect/Image").gameObject;
            BaseButton baseButton = new BaseButton(base.transform.FindChild("panel_down/rule_btn"), 1, 1);

            baseButton.onClick = new Action <GameObject>(this.onShowdes);
            BaseButton baseButton2 = new BaseButton(base.transform.FindChild("ruledes_bg/ruledes/close"), 1, 1);

            baseButton2.onClick = new Action <GameObject>(this.onClosedes);
            BaseButton baseButton3 = new BaseButton(base.transform.FindChild("close"), 1, 1);

            baseButton3.onClick = new Action <GameObject>(this.onClose);
            BaseButton baseButton4 = new BaseButton(base.transform.FindChild("panel_down/upgrade_btn1"), 1, 1);

            baseButton4.onClick = new Action <GameObject>(this.onAddLv);
            BaseButton baseButton5 = new BaseButton(base.transform.FindChild("panel_down/upgrade_btn2"), 1, 1);

            baseButton5.onClick = new Action <GameObject>(this.onAddLv);
            BaseButton baseButton6 = new BaseButton(base.transform.FindChild("panel_down/showorhide_btn"), 1, 1);

            baseButton6.onClick = new Action <GameObject>(this.onShoeorHideTitile);
            this.cteatrve();
            this.SetSliderValue(0f);
        }
示例#8
0
        public override void init()
        {
            inText();
            instance = this;
            contain  = getGameObjectByPath("panel/ScrollPanel/content");
            grid     = getGameObjectByPath("panel/ScrollPanel/grid");


            btnClose         = new BaseButton(getTransformByPath("title/btnClose"));
            btnClose.onClick = onBtnCancelClick;

            scrollControler = new ScrollControler();
            scrollControler.create(getComponentByPath <ScrollRect>("panel/ScrollPanel"));
        }
        public override void init()
        {
            _instance       = this;
            scrollControer0 = new ScrollControler();
            scrollControer0.create(getComponentByPath <ScrollRect>("contain_panel/0/down/Scrollview"));
            inText();
            bigbg = getGameObjectByPath("bigbg");
            //活跃
            huoyue_image   = getGameObjectByPath("contain_panel/0/down/Scrollview/Image");
            huoyue_contain = getTransformByPath("contain_panel/0/down/Scrollview/contain");
            point_txt      = getComponentByPath <Text>("contain_panel/0/top/point/Text");
            reward_panel   = getGameObjectByPath("contain_panel/0/top/items");
            exp_obj        = getGameObjectByPath("contain_panel/0/top/image/exp");
            //抽奖
            roll_in              = getGameObjectByPath("contain_panel/1/roll_in");
            roll_over            = getGameObjectByPath("contain_panel/1/roll_over");
            cj_txt               = getComponentByPath <Text>("contain_panel/1/btn/Text");
            btns_lottery         = new BaseButton(getTransformByPath("contain_panel/1/btn"));
            btns_lottery.onClick = (GameObject go) => { btnOnClick(); };
            item_panel           = getGameObjectByPath("contain_panel/1/cricle/image");
            for (int i = 0; i < item_panel.transform.childCount; i++)
            {
                lst_lottery_obj.Add(item_panel.transform.GetChild(i).gameObject);
            }
            cricleob = getGameObjectByPath("contain_panel/1/cricle");
            //基金
            zuanshi_image      = getGameObjectByPath("contain_panel/2/down/Scrollview/Image");
            zhuansheng_image   = getGameObjectByPath("contain_panel/3/down/Scrollview/Image");
            zhanli_image       = getGameObjectByPath("contain_panel/4/down/Scrollview/Image");
            zuanshi_contain    = getTransformByPath("contain_panel/2/down/Scrollview/contain");
            zhuansheng_contain = getTransformByPath("contain_panel/3/down/Scrollview/contain");
            zhanli_contain     = getTransformByPath("contain_panel/4/down/Scrollview/contain");
            zuanshi_btn        = getGameObjectByPath("contain_panel/2/top/Button");
            zhuansheng_btn     = getGameObjectByPath("contain_panel/3/top/Button");
            zhanli_btn         = getGameObjectByPath("contain_panel/4/top/Button");
            new BaseButton(zuanshi_btn.transform).onClick    = (GameObject go) => { btn_buyfund(1); };
            new BaseButton(zhuansheng_btn.transform).onClick = (GameObject go) => { btn_buyfund(2); };
            new BaseButton(zhanli_btn.transform).onClick     = (GameObject go) => { btn_buyfund(3); };


            contains = getGameObjectByPath("contain_panel");
            initsomething();
            tab.onClickHanle = tabhandel;
            tab.create(getGameObjectByPath("btn_panel"), this.gameObject);
            new BaseButton(getTransformByPath("btn_close")).onClick = (GameObject go) => { closBtnOnclick(); };
            getGameObjectByPath("btn_panel/0/Image").GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_hint_tips");
            getGameObjectByPath("btn_panel/1/Image").GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_hint_tips");
        }
示例#10
0
        public override void init()
        {
            this.scrollControer = new ScrollControler();
            ScrollRect component = base.transform.FindChild("scrollRect").GetComponent <ScrollRect>();

            this.scrollControer.create(component, 4);
            for (int i = 0; i < 3; i++)
            {
                this.objs[i] = base.transform.FindChild("scrollRect/contain/grid" + i).gameObject;
                BaseButton baseButton = new BaseButton(this.objs[i].transform.FindChild("bg/" + i), 1, 1);
                baseButton.onClick = new Action <GameObject>(this.onBtnClicks);
            }
            BaseButton baseButton2 = new BaseButton(base.transform.FindChild("closeBtn"), 1, 1);

            baseButton2.onClick = new Action <GameObject>(this.close);
        }
示例#11
0
        public override void init()
        {
            scrollControer0 = new ScrollControler();
            scrollControer0.create(getComponentByPath <ScrollRect>("left_bg/ScrollView"));
            inText();
            obj_h_bag         = getGameObjectByPath("hallows_bag");
            scrollview_h_name = getGameObjectByPath("left_bg/ScrollView");
            contain_h_name    = getGameObjectByPath("left_bg/ScrollView/contain");
            scrollview_h_bag  = getGameObjectByPath("hallows_bag/hallows_bg/scrollview");
            contain_h_bag     = getGameObjectByPath("hallows_bag/hallows_bg/scrollview/contain");
            grid_h_bag        = getGameObjectByPath("hallows_bag/hallows_bg/scrollview/grid");
            obj_h_attribute   = getGameObjectByPath("right_bg/have/panels/attribute");
            obj_h_infos       = getGameObjectByPath("right_bg/have/panels/info");
            obj_have_panel    = getGameObjectByPath("right_bg/have");
            obj_nohave_panel  = getGameObjectByPath("right_bg/nohave");

            mySoulNum           = getComponentByPath <Text>("right_bg/have/devour_btn/num");
            mySoulNumAndNeednum = getComponentByPath <Text>("right_bg/have/panels/exp/num");
            mySoulNum_bag       = getComponentByPath <Text>("hallows_bag/hallows_bg/num_sh");
            helpcon             = this.transform.FindChild("help").gameObject;
            new BaseButton(this.transform.FindChild("help_btn")).onClick = (GameObject go) =>
            {
                helpcon.SetActive(true);
                ShoworHideModel(false);
            };
            new BaseButton(helpcon.transform.FindChild("close")).onClick = (GameObject go) =>
            {
                helpcon.SetActive(false);
                ShoworHideModel(true);
            };
            close_h         = new BaseButton(getTransformByPath("close"));
            open_h_bag      = new BaseButton(getTransformByPath("openbag_btn"));
            close_h_bag     = new BaseButton(getTransformByPath("hallows_bag/hallows_bg/close_bag"));
            devour_h        = new BaseButton(getTransformByPath("right_bg/have/devour_btn"));
            decompose_h     = new BaseButton(getTransformByPath("hallows_bag/hallows_bg/decompose_btn"));
            toallwear_btn   = new BaseButton(getTransformByPath("hallows_bag/hallows_bg/toallwear_btn"));
            attribute_btn   = new BaseButton(getTransformByPath("right_bg/have/btns/attribute_btn"));
            info_btn        = new BaseButton(getTransformByPath("right_bg/have/btns/info_btn"));
            close_h.onClick = open_h_bag.onClick = close_h_bag.onClick = devour_h.onClick = decompose_h.onClick = attribute_btn.onClick = info_btn.onClick = toallwear_btn.onClick = btnsOnClick;

            initsomething();
        }
        public override void init()
        {
            this.transform.FindChild("Image/title1").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_insideui_fb_5"); //玩家
            this.transform.FindChild("Image/title2").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_insideui_fb_6"); //等级
            this.transform.FindChild("Image/title3").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_insideui_fb_7"); //战绩
            this.transform.FindChild("Image/title4").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_insideui_fb_8"); //战力
            this.transform.FindChild("Image/title5").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_insideui_fb_9"); //荣誉

            scrollControler = new ScrollControler();
            ScrollRect scroll = transform.FindChild("scroll_rect").GetComponent <ScrollRect>();

            scrollControler.create(scroll);
            new BaseButton(this.transform.FindChild("close")).onClick = (GameObject go) => {
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_JDZC_ZHANJI);
            };

            new BaseButton(this.transform.FindChild("close_fb")).onClick = (GameObject go) =>
            {
                a3_insideui_fb.instance.outfb(go);
            };
        }
示例#13
0
        private void initUI()
        {
            this.btWay     = base.getComponentByPath <Button>("way");
            this.btNpc     = base.getComponentByPath <Button>("npc");
            this.btMonster = base.getComponentByPath <Button>("monster");
            this.transCon  = base.getTransformByPath("con/con");
            bool flag = this.type == 0;

            if (flag)
            {
                this.btNpc.interactable = false;
            }
            else
            {
                bool flag2 = this.type == 1;
                if (flag2)
                {
                    this.btMonster.interactable = false;
                }
                else
                {
                    bool flag3 = this.type == 2;
                    if (flag3)
                    {
                        this.btWay.interactable = false;
                    }
                }
            }
            this.btMonster.onClick.AddListener(new UnityAction(this.onMonsterClick));
            this.btNpc.onClick.AddListener(new UnityAction(this.onNpcClick));
            this.btWay.onClick.AddListener(new UnityAction(this.onWayClick));
            this.itemListView    = base.transform.FindChild("con/con").gameObject;
            this.item_Parent     = this.itemListView.GetComponent <GridLayoutGroup>();
            this.scrollControler = new ScrollControler();
            ScrollRect component = base.transform.FindChild("con").GetComponent <ScrollRect>();

            this.scrollControler.create(component, 4);
        }
示例#14
0
        public override void init()
        {
            getComponentByPath <Text>("scrollRect/contain/grid0/bg/Text1").text = ContMgr.getCont("a3_pkmodel_0");
            getComponentByPath <Text>("scrollRect/contain/grid1/bg/Text1").text = ContMgr.getCont("a3_pkmodel_1");
            getComponentByPath <Text>("scrollRect/contain/grid2/bg/Text1").text = ContMgr.getCont("a3_pkmodel_2");


            scrollControer = new ScrollControler();
            ScrollRect scroll = transform.FindChild("scrollRect").GetComponent <ScrollRect>();

            scrollControer.create(scroll);

            for (int i = 0; i < 3; i++)
            {
                objs[i] = transform.FindChild("scrollRect/contain/grid" + i).gameObject;
                BaseButton btns = new BaseButton(objs[i].transform.FindChild("bg/" + i));
                btns.onClick = onBtnClicks;
            }

            BaseButton btn = new BaseButton(transform.FindChild("closeBtn"));

            btn.onClick = close;
        }
示例#15
0
 void ScrollControler()
 {
     scrollControler  = new ScrollControler();
     scrollControler1 = new ScrollControler();
     scrollControler2 = new ScrollControler();
     scrollControler3 = new ScrollControler();
     scrollControler4 = new ScrollControler();
     scrollControler5 = new ScrollControler();
     scrollControler6 = new ScrollControler();
     scrollControler7 = new ScrollControler();
     scrollControler8 = new ScrollControler();
     scrollControler9 = new ScrollControler();
     scrollControler.create(getComponentByPath <ScrollRect>("compose/left/bg/down/scrollview"));
     scrollControler1.create(getComponentByPath <ScrollRect>("compose/left/bg/top/lv/scrollview"));
     scrollControler2.create(getComponentByPath <ScrollRect>("compose/left/bg/top/quality/scrollview"));
     scrollControler3.create(getComponentByPath <ScrollRect>("compose/left/bg/top/name/scrollview"));
     scrollControler4.create(getComponentByPath <ScrollRect>("haverunestones/scrollview"));
     scrollControler5.create(getComponentByPath <ScrollRect>("decompose/scroll_view"));
     scrollControler6.create(getComponentByPath <ScrollRect>("list/down/scrollview"));
     scrollControler7.create(getComponentByPath <ScrollRect>("list/top/lv/scrollview"));
     scrollControler8.create(getComponentByPath <ScrollRect>("list/top/quality/scrollview"));
     scrollControler9.create(getComponentByPath <ScrollRect>("list/top/name/scrollview"));
 }
        void init()
        {
            tranObj.transform.FindChild("btns/1/Text").GetComponent <Text>().text = ContMgr.getCont("a3_summon_tujian_0");
            tranObj.transform.FindChild("btns/2/Text").GetComponent <Text>().text = ContMgr.getCont("a3_summon_tujian_1");
            tranObj.transform.FindChild("btns/3/Text").GetComponent <Text>().text = ContMgr.getCont("a3_summon_tujian_2");
            tranObj.transform.FindChild("btns/4/Text").GetComponent <Text>().text = ContMgr.getCont("a3_summon_tujian_3");
            tranObj.transform.FindChild("btns/5/Text").GetComponent <Text>().text = ContMgr.getCont("a3_summon_tujian_4");
            tranObj.transform.FindChild("need/GetNeed_1/todo/Text").GetComponent <Text>().text = ContMgr.getCont("a3_summon_tujian_6");
            tranObj.transform.FindChild("need/GetNeed_1/name").GetComponent <Text>().text      = ContMgr.getCont("a3_summon_tujian_5");
            tranObj.transform.FindChild("need/GetNeed_2/name").GetComponent <Text>().text      = ContMgr.getCont("a3_summon_tujian_5");
            tranObj.transform.FindChild("need/GetNeed_2/todo/Text").GetComponent <Text>().text = ContMgr.getCont("a3_summon_tujian_6");
            tranObj.transform.FindChild("info/minjie/Text").GetComponent <Text>().text         = ContMgr.getCont("a3_summon_xilian_2");
            tranObj.transform.FindChild("info/tili/Text").GetComponent <Text>().text           = ContMgr.getCont("a3_summon_xilian_3");
            tranObj.transform.FindChild("info/gongji/Text").GetComponent <Text>().text         = ContMgr.getCont("a3_summon_xilian_4");
            tranObj.transform.FindChild("info/fangyu/Text").GetComponent <Text>().text         = ContMgr.getCont("a3_summon_xilian_5");



            instans = this;
            itemXml = XMLMgr.instance.GetSXML("item");
            sumView = tranObj.transform.FindChild("summonlist/summons/scroll/content");
            btns    = tranObj.transform.FindChild("btns");
            //selectframe = tranObj.transform.FindChild("summonlist/summons/scroll/frame");
            getEventTrigerByPath("tach").onDrag = OnDrag;
            for (int i = 0; i < btns.childCount; i++)
            {
                new BaseButton(btns.GetChild(i)).onClick = (GameObject go) => {
                    setBtn(int.Parse(go.name));
                };
            }
            SetList();

            scrollControler = new ScrollControler();
            ScrollRect scroll = tranObj.transform.FindChild("summonlist/summons/scroll").GetComponent <ScrollRect>();

            scrollControler.create(scroll);
        }
        int maxPageNum_left = 6;  //最大页数

        public override void init()
        {
            money = transform.FindChild("money_bg/money").GetComponent <Text>();
            gold  = transform.FindChild("gem_bg/stone").GetComponent <Text>();
            coin  = transform.FindChild("bdgem_bg/bindstone").GetComponent <Text>();
            textPageIndex_right = this.getComponentByPath <Text>("page_right/Text");
            textPageIndex_left  = this.getComponentByPath <Text>("page_left/Text");

            itemListView  = transform.FindChild("bag_scroll/scroll_view/contain").gameObject;
            item_Parent   = itemListView.GetComponent <GridLayoutGroup>();
            houseListView = transform.FindChild("house_scroll/scroll_view/contain").gameObject;
            house_Parent  = houseListView.GetComponent <GridLayoutGroup>();
            BaseButton btn_close = new BaseButton(transform.FindChild("btn_close"));

            btn_close.onClick = onclose;
            BaseButton close_btn = new BaseButton(transform.FindChild("close_btn"));

            close_btn.onClick = onclose;
            new BaseButton(transform.FindChild("money_bg/money/add_money")).onClick = (GameObject go) => {
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_EXCHANGE);
                a3_exchange.Instance.transform.SetSiblingIndex(this.transform.GetSiblingIndex() + 1);
            };
            new BaseButton(transform.FindChild("gem_bg/stone/add_stone")).onClick = (GameObject go) => {
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_RECHARGE);
                a3_Recharge.Instance?.transform.SetSiblingIndex(this.transform.GetSiblingIndex() + 1);
            };
            new BaseButton(transform.FindChild("bdgem_bg/bindstone/add_bangstone")).onClick = (GameObject go) =>
            {
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_RECHARGE);
            };
            BaseButton btn_open = new BaseButton(transform.FindChild("panel_open/open"));

            btn_open.onClick = onOpenLock;

            BaseButton btn_close_open = new BaseButton(transform.FindChild("panel_open/close"));

            btn_close_open.onClick = onCloseOpen;

            scrollControler = new ScrollControler();
            ScrollRect scroll = transform.FindChild("bag_scroll/scroll_view").GetComponent <ScrollRect>();

            scrollControler.create(scroll);
            open_bar = transform.FindChild("panel_open/Scrollbar").GetComponent <Scrollbar>();
            open_bar.onValueChanged.AddListener(onNumChange);

            for (int i = 50; i < itemListView.transform.childCount; i++)
            {
                if (i >= a3_BagModel.getInstance().curi)
                {
                    GameObject lockig = itemListView.transform.GetChild(i).FindChild("lock").gameObject;
                    lockig.SetActive(true);
                    int        tag = i + 1;
                    BaseButton btn = new BaseButton(lockig.transform);
                    btn.onClick = delegate(GameObject go) { this.onClickOpenBagLock(lockig, tag); };
                }
            }
            for (int i = 10; i < houseListView.transform.childCount; i++)
            {
                if (i >= a3_BagModel.getInstance().house_curi)
                {
                    GameObject lockig = houseListView.transform.GetChild(i).FindChild("lock").gameObject;
                    lockig.SetActive(true);
                    int        tag = i + 1;
                    BaseButton btn = new BaseButton(lockig.transform);
                    btn.onClick = delegate(GameObject go) { this.onClickOpenHouseLock(lockig, tag); };
                }
            }
            for (int i = 1; i <= 2; i++)
            {
                Toggle tog = transform.FindChild("panel_open/open_choose/Toggle" + i).GetComponent <Toggle>();
                int    tag = i;
                tog.onValueChanged.AddListener(delegate(bool isOn)
                {
                    open_choose_tag = tag;
                    checkNumChange();
                });
            }
            Toggle auto = transform.FindChild("auto").GetComponent <Toggle>();

            auto.onValueChanged.AddListener(delegate(bool isOn)
            {
                is_auto = isOn;
            });


            new BaseButton(transform.FindChild("page_right/right")).onClick = (GameObject go) =>
            {
                if (pageIndex_right < maxPageNum_right)
                {
                    pageIndex_right++;
                }

                show_page_right();
            };
            new BaseButton(transform.FindChild("page_right/left")).onClick = (GameObject go) =>
            {
                if (pageIndex_right > 1)
                {
                    pageIndex_right--;
                }
                show_page_right();
            };

            new BaseButton(transform.FindChild("page_left/right")).onClick = (GameObject go) =>
            {
                if (pageIndex_left < maxPageNum_left)
                {
                    pageIndex_left++;
                }
                show_page_left();
            };
            new BaseButton(transform.FindChild("page_left/left")).onClick = (GameObject go) =>
            {
                if (pageIndex_left > 1)
                {
                    pageIndex_left--;
                }
                show_page_left();
            };
            InvokeRepeating("OnShowAchievementPage_right", 0, 0.3f);
            InvokeRepeating("OnShowAchievementPage_left", 0, 0.3f);


            getComponentByPath <Text>("auto/Text").text            = ContMgr.getCont("a3_warehouse_0");
            getComponentByPath <Text>("close_btn/Text").text       = ContMgr.getCont("a3_warehouse_1");
            getComponentByPath <Text>("panel_open/Text").text      = ContMgr.getCont("a3_warehouse_2");
            getComponentByPath <Text>("panel_open/open/Text").text = ContMgr.getCont("a3_warehouse_3");
            getComponentByPath <Text>("panel_open/open_choose/Toggle1/Label").text = ContMgr.getCont("a3_warehouse_4");
            getComponentByPath <Text>("panel_open/open_choose/Toggle2/Label").text = ContMgr.getCont("a3_warehouse_5");
            getComponentByPath <Text>("panel_open/title/Text").text = ContMgr.getCont("a3_warehouse_6");
        }
示例#18
0
        public override void init()
        {
            scrollControer0 = new ScrollControler();
            scrollControer0.create(getComponentByPath <ScrollRect>("att"));

            wingModel = A3_WingModel.getInstance();
            wingXML   = wingModel.WingXML;

            textName  = this.getComponentByPath <Text>("Text_name");
            textLevel = this.getComponentByPath <Text>("Text_name/lvl");
            textStage = this.getComponentByPath <Text>("Text_name/stage");

            btnHelp         = new BaseButton(this.getTransformByPath("title/help"));
            btnHelp.onClick = OnOpenHelp;

            tempPgaeAtt = this.getGameObjectByPath("att_temp");
            conAtt      = this.getTransformByPath("att/grid");

            conLevelTable           = this.getTransformByPath("con_level");
            textSliderState         = this.getComponentByPath <Text>("con_level/expbar/text");
            btnLevelUpgrade         = new BaseButton(this.getTransformByPath("con_level/upgrade"));
            btnLevelUpgrade.onClick = OnUpgradeClick;
            btnLevelOneKey          = new BaseButton(this.getTransformByPath("con_level/onekey"));
            btnLevelOneKey.onClick  = OnUpgradeOneKey;
            conStar      = this.getTransformByPath("con_level/con_star");
            sliderExpBar = this.getComponentByPath <Slider>("con_level/expbar/slider");

            conCompleteTable = this.getTransformByPath("con_complete");


            conIcon              = this.getTransformByPath("panel_icon/mask/scroll_rect/con_icon");
            iconTemp             = this.getGameObjectByPath("panel_icon/icon_temp");
            btnTurnLeft          = new BaseButton(this.getTransformByPath("panel_icon/btn_left"));
            btnTurnLeft.onClick  = OnTurnLeftClick;
            btnTurnRight         = new BaseButton(this.getTransformByPath("panel_icon/btn_right"));
            btnTurnRight.onClick = OnTurnRightClick;

            BaseButton close_btn = new BaseButton(this.getTransformByPath("btn_close"));

            close_btn.onClick = onClose;

            textLevelCostItemSum = this.getComponentByPath <Text>("con_level/upgrade/text");

            conStageTable        = this.getTransformByPath("con_stage");
            textStageRate        = this.getComponentByPath <Text>("con_stage/rate");
            textStageCostItemSum = this.getComponentByPath <Text>("con_stage/improve/text");
            btnStageUp           = new BaseButton(this.getTransformByPath("con_stage/improve"));
            btnStageUp.onClick   = OnStageUpClick;
            sliderStage          = this.getComponentByPath <Slider>("con_stage/slider");
            sliderStage.onValueChanged.AddListener(OnSliderValueChange);
            sliderStage.value = 1;

            conHelpPanel         = this.getTransformByPath("panel_help");
            btnCloseHelp         = new BaseButton(this.getTransformByPath("panel_help/closeBtn"));
            btnCloseHelp.onClick = OnCloseHelp;

            aniExp     = conLevelTable.GetComponent <Animator>();
            aniLevelUp = this.getGameObjectByPath("ani_lvlUP");
            process    = new processStruct(Update_wing, "a3_wing_skin");

            this.getEventTrigerByPath("panel_icon").onDrag = onDragIcon;

            aniStarTrans = this.getTransformByPath("con_level/con_star/ani_star");
            conStarPoint = this.getTransformByPath("con_level/point");

            this.getEventTrigerByPath("con_avatar/avatar_touch").onDrag = OnDrag;

            BaseButton btnWing = new BaseButton(this.getTransformByPath("btnWing"));

            btnWing.onClick = OnEquWing;

            success = this.transform.FindChild("ani_success").GetComponent <Animator>();
            fail    = this.transform.FindChild("ani_fail").GetComponent <Animator>();


            needobjid_stage = XMLMgr.instance.GetSXML("wings.stage_item").getInt("item_id");
            needobj_id      = XMLMgr.instance.GetSXML("wings.level_item").getInt("item_id");

            #region 初始化汉字
            getComponentByPath <Text>("title/Text").text               = ContMgr.getCont("a3_wing_skin_0");
            getComponentByPath <Text>("att_temp/text_name").text       = ContMgr.getCont("a3_wing_skin_1");
            getComponentByPath <Text>("con_level/upgrade/Text").text   = ContMgr.getCont("a3_wing_skin_2");
            getComponentByPath <Text>("con_level/onekey/Text").text    = ContMgr.getCont("a3_wing_skin_3");
            getComponentByPath <Text>("con_level/shengyu").text        = ContMgr.getCont("a3_wing_skin_4");
            getComponentByPath <Text>("con_stage/Text").text           = ContMgr.getCont("a3_wing_skin_5");
            getComponentByPath <Text>("con_stage/shengyu").text        = ContMgr.getCont("a3_wing_skin_4");
            getComponentByPath <Text>("con_complete/title/text").text  = ContMgr.getCont("a3_wing_skin_6");
            getComponentByPath <Text>("btn_equip/Text").text           = ContMgr.getCont("a3_wing_skin_7");
            getComponentByPath <Text>("panel_icon/icon_temp/lvl").text = ContMgr.getCont("a3_wing_skin_8");
            getComponentByPath <Text>("btnWing/Text").text             = ContMgr.getCont("a3_wing_skin_9");
            getComponentByPath <Text>("panel_help/descTxt").text       = ContMgr.getCont("a3_wing_skin_10");
            getComponentByPath <Text>("panel_help/closeBtn/Text").text = ContMgr.getCont("a3_wing_skin_11");
            #endregion
        }
        public void Init()
        {
            _instance             = this;
            itemTeamInfoPrefabDic = new Dictionary <uint, itemTeamInfoPrefab>();
            BaseButton btnJoinTeam = new BaseButton(transform.FindChild("right/bottom/btnJoinTeam"));

            btnJoinTeam.onClick = onBtnJoinTeamClick;
            BaseButton btnCreateTeam = new BaseButton(transform.FindChild("right/bottom/btnCreateTeam"));

            btnCreateTeam.onClick = onBtnCreateClick;
            team_object           = transform.FindChild("team_object").gameObject;

            team_objectPanel = team_object.transform.FindChild("Dropdown").gameObject.GetComponent <Dropdown>();

            team_objectPanel.captionText.text = ContMgr.getCont("a3_teamPanel_16");
            for (int i = 0; i < team_objectPanel.options.Count; i++)
            {
                team_objectPanel.options[i].text = ContMgr.getCont("a3_teamPanel_" + (i + 16));
            }

            team_object.SetActive(false);

            BaseButton btn_1_object = new BaseButton(transform.FindChild("team_object/btn_1"));

            btn_1_object.onClick = onbtn_1_Click;
            BaseButton btn_0_object = new BaseButton(transform.FindChild("team_object/btn_0"));

            btn_0_object.onClick = onbtn_0_Click;

            BaseButton btnRefresh = new BaseButton(transform.FindChild("right/bottom/btnRefresh"));

            btnRefresh.onClick = onBtnRefreshClick;
            new BaseButton(transform.FindChild("right/bottom/speedteam")).onClick = (GameObject go) =>
            {
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_SPEEDTEAM);
            };


            Toggle togShowNearbyPanel = transform.FindChild("right/main/body/showNearby").GetComponent <Toggle>();

            togShowNearbyPanel.onValueChanged.AddListener(onShowNearby);
            getProfessionSprite();

            #region 初始化汉字
            getComponentByPath <Text>("title/txts/txtCaptain").text            = ContMgr.getCont("a3_teamPanel_0");
            getComponentByPath <Text>("title/txts/txtLvl").text                = ContMgr.getCont("a3_teamPanel_1");
            getComponentByPath <Text>("title/txts/txtKnightage").text          = ContMgr.getCont("a3_teamPanel_2");
            getComponentByPath <Text>("title/txts/txtMap").text                = ContMgr.getCont("a3_teamPanel_3");
            getComponentByPath <Text>("title/txts/txtMembCount").text          = ContMgr.getCont("a3_teamPanel_4");
            getComponentByPath <Text>("right/main/body/showNearby/Label").text = ContMgr.getCont("a3_teamPanel_5");
            getComponentByPath <Text>("right/bottom/btnRefresh/Text").text     = ContMgr.getCont("a3_teamPanel_6");
            getComponentByPath <Text>("right/bottom/btnCreateTeam/Text").text  = ContMgr.getCont("a3_teamPanel_7");
            getComponentByPath <Text>("right/bottom/btnJoinTeam/Text").text    = ContMgr.getCont("a3_teamPanel_8");
            getComponentByPath <Text>("right/bottom/speedteam/Text").text      = ContMgr.getCont("a3_teamPanel_9");
            getComponentByPath <Text>("itemPrefabs/itemTeamInfo/team_pre/4/apply/Text").text = ContMgr.getCont("a3_teamPanel_15");
            getComponentByPath <Text>("itemPrefabs/itemTeamInfo/btnWatch/Text").text         = ContMgr.getCont("a3_teamPanel_10");
            getComponentByPath <Text>("itemPrefabs/itemTeamInfo/txtLvl").text       = ContMgr.getCont("a3_teamPanel_1");
            getComponentByPath <Text>("itemPrefabs/itemTeamInfo/txtKnightage").text = ContMgr.getCont("a3_teamPanel_2");
            getComponentByPath <Text>("itemPrefabs/itemTeamInfo/txtMap").text       = ContMgr.getCont("a3_teamPanel_11");
            getComponentByPath <Text>("team_object/text").text           = ContMgr.getCont("a3_teamPanel_12");
            getComponentByPath <Text>("team_object/btn_0/text").text     = ContMgr.getCont("a3_teamPanel_13");
            getComponentByPath <Text>("team_object/btn_1/text").text     = ContMgr.getCont("a3_teamPanel_14");
            getComponentByPath <Text>("team_object/Dropdown/Label").text = ContMgr.getCont("a3_teamPanel_16");

            ScrollControler scrollControer0 = new ScrollControler();
            scrollControer0.create(getComponentByPath <ScrollRect>("right/main/body/Panel"));
            #endregion
        }
示例#20
0
        public override void init()
        {
            getComponentByPath <Text>("btn/doup/Text").text = ContMgr.getCont("a3_ygyiwu_0");
            getComponentByPath <Text>("tab_01/God/help_text/help/descTxt").text = ContMgr.getCont("a3_ygyiwu_1") + "\n" + ContMgr.getCont("a3_ygyiwu_2") + "\n" + ContMgr.getCont("a3_ygyiwu_3");

            instan = this;
            plane  = this.transform.FindChild("tab_01/info").gameObject;
            BaseButton close = new BaseButton(this.transform.FindChild("over"));

            IconHint      = this.transform.FindChild("btn/per_btn/IconHint").gameObject;
            close.onClick = onClose;
            BaseButton God_btn = new BaseButton(this.transform.FindChild("btn/God_btn"));

            God_btn.onClick = (GameObject go) =>
            {
                index = 0;
                ref_topText();
            };
            if (FunctionOpenMgr.instance.Check(FunctionOpenMgr.JL_SL))
            {
                getGameObjectByPath("btn/lockp").SetActive(false);
            }
            else
            {
                getGameObjectByPath("btn/lockp").SetActive(true);
            }
            new BaseButton(getTransformByPath("btn/lockp")).onClick = (GameObject go) =>
            {
                flytxt.instance.fly(ContMgr.getCont("func_limit_44"));
            };
            isthis = this.transform.FindChild("btn/this").gameObject;
            isthis.SetActive(false);
            BaseButton per_btn = new BaseButton(this.transform.FindChild("btn/per_btn"));

            per_btn.onClick = (GameObject go) =>
            {
                index = 1;
                ref_topText();
            };
            BaseButton study_btn = new BaseButton(this.transform.FindChild("tab_02/go"));

            study_btn.onClick = onStudy;

            BaseButton tachback = new BaseButton(this.transform.FindChild("tab_01/info/tach"));
            BaseButton back     = new BaseButton(this.transform.FindChild("tab_01/info/back"));

            new BaseButton(transform.FindChild("tab_01/God/help_God")).onClick = (GameObject go) =>
            {
                transform.FindChild("tab_01/God/help_text").gameObject.SetActive(true);
            };
            new BaseButton(transform.FindChild("tab_01/per/help_Pre")).onClick = (GameObject go) =>
            {
                transform.FindChild("tab_01/per/help_text").gameObject.SetActive(true);
            };

            new BaseButton(transform.FindChild("tab_01/God/help_text/close")).onClick    =
                new BaseButton(transform.FindChild("tab_01/God/help_text/tach")).onClick = (GameObject go) => { transform.FindChild("tab_01/God/help_text").gameObject.SetActive(false); };
            new BaseButton(transform.FindChild("tab_01/per/help_text/close")).onClick    =
                new BaseButton(transform.FindChild("tab_01/per/help_text/tach")).onClick = (GameObject go) => { transform.FindChild("tab_01/per/help_text").gameObject.SetActive(false); };
            back.onClick = tachback.onClick = (GameObject go) =>
            {
                if (index == 0)
                {
                    this.transform.FindChild("tab_01/God").gameObject.SetActive(true);
                }
                else if (index == 1)
                {
                    this.transform.FindChild("tab_01/per").gameObject.SetActive(true);
                }
                this.transform.FindChild("tab_01/info").gameObject.SetActive(false);
                this.transform.FindChild("btn").gameObject.SetActive(true);
            };
            BaseButton do_book = new BaseButton(this.transform.FindChild("btn/doup"));

            do_book.onClick = (GameObject go) =>
            {
                CloseIndex = 1;
                this.transform.FindChild("tab_01").gameObject.SetActive(false);
                this.transform.FindChild("btn").gameObject.SetActive(false);
                this.transform.FindChild("tab_02").gameObject.SetActive(true);
            };
            this.getEventTrigerByPath("tach").onDrag = OnDrag;
            studybar = this.transform.FindChild("tab_02/bar").GetComponent <Image>();
            into_God();
            into_per();
            A3_ygyiwuProxy.getInstance().SendYGinfo(2);
            refreshinfo(null);

            scrollControler = new ScrollControler();
            ScrollRect scroll = transform.FindChild("tab_01/God/view").GetComponent <ScrollRect>();

            scrollControler.create(scroll);

            scrollControler1 = new ScrollControler();
            ScrollRect scroll1 = transform.FindChild("tab_01/per/view").GetComponent <ScrollRect>();

            scrollControler1.create(scroll1);
        }
示例#21
0
        public override void init()
        {
            a3_equipsell._instance = this;
            this.scrollControer    = new ScrollControler();
            ScrollRect component = base.transform.FindChild("panel_right/bg/Scroll_rect").GetComponent <ScrollRect>();

            this.scrollControer.create(component, 4);
            this.scrollcontroers = new ScrollControler();
            ScrollRect component2 = base.transform.FindChild("panel_left/bg/Scrollrect").GetComponent <ScrollRect>();

            this.scrollcontroers.create(component2, 4);
            this.contain         = base.transform.FindChild("panel_right/bg/Scroll_rect/contain").gameObject;
            this.grid            = base.transform.FindChild("panel_right/bg/Scroll_rect/grid").gameObject;
            this.contain_left    = base.transform.FindChild("panel_left/bg/Scrollrect/contain").gameObject;
            this.white           = base.getComponentByPath <Toggle>("panel_left/panel/Toggle_white");
            this.mojing          = base.getComponentByPath <Text>("panel_left/panel/mojing/num");
            this.shengguanghuiji = base.getComponentByPath <Text>("panel_left/panel/shenguang/num");
            this.mifageli        = base.getComponentByPath <Text>("panel_left/panel/mifa/num");
            this.prompt          = base.getGameObjectByPath("prompt");
            this.quick_image     = base.getGameObjectByPath("panel_right/bg/Image");
            this.white.onValueChanged.AddListener(delegate(bool ison)
            {
                if (ison)
                {
                    this.EquipsSureSell(0u, 1);
                }
                else
                {
                    this.EquipsNoSell(0u, 1);
                }
            });
            this.green = base.getComponentByPath <Toggle>("panel_left/panel/Toggle_green");
            this.green.onValueChanged.AddListener(delegate(bool ison)
            {
                if (ison)
                {
                    this.EquipsSureSell(0u, 2);
                }
                else
                {
                    this.EquipsNoSell(0u, 2);
                }
            });
            this.blue = base.getComponentByPath <Toggle>("panel_left/panel/Toggle_blue");
            this.blue.onValueChanged.AddListener(delegate(bool ison)
            {
                if (ison)
                {
                    this.EquipsSureSell(0u, 3);
                }
                else
                {
                    this.EquipsNoSell(0u, 3);
                }
            });
            this.purple = base.getComponentByPath <Toggle>("panel_left/panel/Toggle_puple");
            this.purple.onValueChanged.AddListener(delegate(bool ison)
            {
                if (ison)
                {
                    this.EquipsSureSell(0u, 4);
                }
                else
                {
                    this.EquipsNoSell(0u, 4);
                }
            });
            BaseButton baseButton = new BaseButton(base.transform.FindChild("btn_close"), 1, 1);

            baseButton.onClick = new Action <GameObject>(this.onclose);
            BaseButton baseButton2 = new BaseButton(base.transform.FindChild("panel_right/Button"), 1, 1);

            baseButton2.onClick = new Action <GameObject>(this.onQuicklyChoose);
            BaseButton baseButton3 = new BaseButton(base.transform.FindChild("panel_left/Button"), 1, 1);

            baseButton3.onClick = new Action <GameObject>(this.onDecompose);
            BaseButton baseButton4 = new BaseButton(this.prompt.transform.FindChild("Button"), 1, 1);

            baseButton4.onClick = new Action <GameObject>(this.Sendproxy);
            BaseButton baseButton5 = new BaseButton(this.prompt.transform.FindChild("btn_close"), 1, 1);

            baseButton5.onClick = delegate(GameObject go)
            {
                this.prompt.SetActive(false);
            };
        }
示例#22
0
        public override void init()
        {
            instan          = this;
            scrollControer0 = new ScrollControler();
            scrollControer0.create(getComponentByPath <ScrollRect>("bottomCon/tab_2/scrollview"));
            if (uiData != null)
            {
                int type = (int)uiData[0];
                setopen(type);
            }

            tip              = this.transform.FindChild("tip").gameObject;
            btnClose         = new BaseButton(this.getTransformByPath("btn_close"));
            btnClose.onClick = OnCLoseClick;

            v_con         = this.transform.FindChild("bottomCon/tab_1/con_btn/scrollview/con");
            up            = this.transform.FindChild("bottomCon/tab_1/con_btn/Image_shang").gameObject;
            down          = this.transform.FindChild("bottomCon/tab_1/con_btn/Image_xia").gameObject;
            isManLvl      = this.transform.FindChild("topCon/isMaxLvl").gameObject;
            imageCurLevel = this.getComponentByPath <Image>("topCon/Image_level");
            //sliderExp = this.getComponentByPath<Slider>("topCon/expSlider");
            ExpImg              = this.getComponentByPath <Image>("topCon/Image_exp");
            textBuyNum          = this.getComponentByPath <Text>("topCon/Text_bg_1/Text_num");
            textNextLevel       = this.getComponentByPath <Text>("topCon/Text_level");
            btnRecharge         = new BaseButton(this.getTransformByPath("btn_recharge"));
            btnRecharge.onClick = OnRechargeBtnClick;
            vipGiftBtn          = new BaseButton(this.getTransformByPath("bottomCon/top_btn/btn_1"));
            vipGiftBtn.onClick  = OpenVipGift;
            vipPriBtn           = new BaseButton(this.getTransformByPath("bottomCon/top_btn/btn_2"));
            vipPriBtn.onClick   = OpenVipPri;

            //tab
            tab1 = this.getGameObjectByPath("bottomCon/tab_1");
            tab2 = this.getGameObjectByPath("bottomCon/tab_2");
            //tab_1
            conBtnTable        = this.getTransformByPath("bottomCon/tab_1/con_btn");
            viplnl_view        = conBtnTable.FindChild("scrollview/con");
            conGiftTable       = this.getTransformByPath("bottomCon/tab_1/con_gift");
            conPermissionTable = this.getTransformByPath("bottomCon/tab_1/con_permission");
            btnGetGift         = new BaseButton(this.getTransformByPath("bottomCon/tab_1/con_gift/btn_get"));
            giftlvl            = this.getTransformByPath("bottomCon/tab_1/con_gift/Text_level");
            lvl = giftlvl.GetComponent <Text>();
            btnGetGift.onClick = OnGetBtnClick;
            this.transform.FindChild("bottomCon/tab_1/con_btn/scrollview").GetComponent <ScrollRect>().onValueChanged.AddListener((any) => CheckArrow());
            con    = conPermissionTable.FindChild("view/con").GetComponent <RectTransform>();
            conBtn = conBtnTable.FindChild("scrollview/con");
            gftCon = conGiftTable.FindChild("view/con").GetComponent <RectTransform>();

            this.transform.FindChild("Image_left").GetComponent <CanvasGroup>().blocksRaycasts  = false;
            this.transform.FindChild("Image_right").GetComponent <CanvasGroup>().blocksRaycasts = false;

            //tab_2
            conState = this.getTransformByPath("bottomCon/tab_2");
            //textVipState = this.getComponentByPath<Text>("bottomCon/tab_2/scrollview/con");

            vipModel = A3_VipModel.getInstance();
            vipXml   = vipModel.VipLevelXML;

            v  = con.position;
            v1 = conBtn.position;
            v2 = gftCon.position;
            InitBtnList();
            InitVip_priList();
            //textVipState.text = vipModel.GetVipState();
            vipGiftBtn.interactable = false;
            base.init();


            getComponentByPath <Text>("bottomCon/tab_1/con_gift/btn_get/text").text             = ContMgr.getCont("a3_vip_0");
            getComponentByPath <Text>("bottomCon/tab_1/con_gift/Text_level/Text").text          = ContMgr.getCont("a3_vip_1");
            getComponentByPath <Text>("bottomCon/tab_1/con_gift/ImageTemp/pri_text").text       = ContMgr.getCont("a3_vip_2");
            getComponentByPath <Text>("bottomCon/tab_1/con_permission/ImageTemp/pri_text").text = ContMgr.getCont("a3_vip_2");
            getComponentByPath <Text>("bottomCon/tab_1/con_permission/Text").text              = ContMgr.getCont("a3_vip_3");
            getComponentByPath <Text>("bottomCon/tab_2/top_text/per_tip/Text").text            = ContMgr.getCont("a3_vip_4");
            getComponentByPath <Text>("bottomCon/tab_2/scrollview/con/item/per_tip/Text").text = ContMgr.getCont("a3_vip_4");
            getComponentByPath <Text>("bottomCon/top_btn/btn_1/Text").text = ContMgr.getCont("a3_vip_5");
            getComponentByPath <Text>("bottomCon/top_btn/btn_2/Text").text = ContMgr.getCont("a3_vip_6");
            getComponentByPath <Text>("topCon/isMaxLvl").text   = ContMgr.getCont("a3_vip_7");
            getComponentByPath <Text>("btn_recharge/text").text = ContMgr.getCont("a3_vip_8");
            getComponentByPath <Text>("topCon/Text_bg_1").text  = ContMgr.getCont("Text_bg_1");


            getComponentByPath <Text>("tip/text_bg/name/lite").text = ContMgr.getCont("a3_vip_9");
            getComponentByPath <Text>("tip/text_bg/name/has").text  = ContMgr.getCont("a3_vip_10");
        }