Пример #1
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);
        }
Пример #2
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);
        }