Пример #1
0
        public override void init()
        {
            a3_vip.instan = this;
            bool flag = this.uiData != null;

            if (flag)
            {
                int type = (int)this.uiData[0];
                this.setopen(type);
            }
            this.tip                 = base.transform.FindChild("tip").gameObject;
            this.btnClose            = new BaseButton(base.getTransformByPath("btn_close"), 1, 1);
            this.btnClose.onClick    = new Action <GameObject>(this.OnCLoseClick);
            this.isManLvl            = base.transform.FindChild("topCon/isMaxLvl").gameObject;
            this.imageCurLevel       = base.getComponentByPath <Image>("topCon/Image_level");
            this.ExpImg              = base.getComponentByPath <Image>("topCon/Image_exp");
            this.textBuyNum          = base.getComponentByPath <Text>("topCon/Text_bg_1/Text_num");
            this.textNextLevel       = base.getComponentByPath <Text>("topCon/Text_level");
            this.btnRecharge         = new BaseButton(base.getTransformByPath("btn_recharge"), 1, 1);
            this.btnRecharge.onClick = new Action <GameObject>(this.OnRechargeBtnClick);
            this.vipGiftBtn          = new BaseButton(base.getTransformByPath("bottomCon/top_btn/btn_1"), 1, 1);
            this.vipGiftBtn.onClick  = new Action <GameObject>(this.OpenVipGift);
            this.vipPriBtn           = new BaseButton(base.getTransformByPath("bottomCon/top_btn/btn_2"), 1, 1);
            this.vipPriBtn.onClick   = new Action <GameObject>(this.OpenVipPri);
            this.tab1                = base.getGameObjectByPath("bottomCon/tab_1");
            this.tab2                = base.getGameObjectByPath("bottomCon/tab_2");
            this.conBtnTable         = base.getTransformByPath("bottomCon/tab_1/con_btn");
            this.viplnl_view         = this.conBtnTable.FindChild("scrollview/con");
            this.conGiftTable        = base.getTransformByPath("bottomCon/tab_1/con_gift");
            this.conPermissionTable  = base.getTransformByPath("bottomCon/tab_1/con_permission");
            this.btnGetGift          = new BaseButton(base.getTransformByPath("bottomCon/tab_1/con_gift/btn_get"), 1, 1);
            this.giftlvl             = base.getTransformByPath("bottomCon/tab_1/con_gift/Text_level");
            this.lvl                 = this.giftlvl.GetComponent <Text>();
            this.btnGetGift.onClick  = new Action <GameObject>(this.OnGetBtnClick);
            this.up_btn              = new BaseButton(base.getTransformByPath("bottomCon/tab_1/con_btn/up_btn"), 1, 1);
            this.dow_btn             = new BaseButton(base.getTransformByPath("bottomCon/tab_1/con_btn/dow_btn"), 1, 1);
            this.up_btn.onClick      = new Action <GameObject>(this.onUp_btn);
            this.dow_btn.onClick     = new Action <GameObject>(this.onDow_btn);
            this.con                 = this.conPermissionTable.FindChild("view/con").GetComponent <RectTransform>();
            this.conBtn              = this.conBtnTable.FindChild("scrollview/con");
            this.gftCon              = this.conGiftTable.FindChild("view/con").GetComponent <RectTransform>();
            base.transform.FindChild("Image_left").GetComponent <CanvasGroup>().blocksRaycasts  = false;
            base.transform.FindChild("Image_right").GetComponent <CanvasGroup>().blocksRaycasts = false;
            this.conState = base.getTransformByPath("bottomCon/tab_2");
            this.vipModel = ModelBase <A3_VipModel> .getInstance();

            this.vipXml = this.vipModel.VipLevelXML;
            this.v      = this.con.position;
            this.v1     = this.conBtn.position;
            this.v2     = this.gftCon.position;
            this.InitBtnList();
            this.InitVip_priList();
            this.vipGiftBtn.interactable = false;
            base.init();
        }
Пример #2
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");
        }