コード例 #1
0
        public override void init()
        {
            getComponentByPath <Text>("info/btns/contain/fenjie/Text").text = ContMgr.getCont("a3_runestonetip_0");
            getComponentByPath <Text>("info/btns/contain/sell/Text").text   = ContMgr.getCont("a3_runestonetip_1");
            getComponentByPath <Text>("info/btns/contain/output/Text").text = ContMgr.getCont("a3_runestonetip_2");
            getComponentByPath <Text>("info/btns/contain/do/Text").text     = ContMgr.getCont("a3_runestonetip_3");
            getComponentByPath <Text>("info/btns/contain/down/Text").text   = ContMgr.getCont("a3_runestonetip_4");



            _instance             = this;
            btn_close             = new BaseButton(getTransformByPath("bg"));
            btn_close.onClick     = closeOnclick;
            btn_sell              = new BaseButton(getTransformByPath("info/btns/contain/sell"));
            btn_sell.onClick      = btn_sell_Onclick;
            btn_dress             = new BaseButton(getTransformByPath("info/btns/contain/do"));
            btn_dress.onClick     = btn_dress_Onclick;
            btn_out               = new BaseButton(getTransformByPath("info/btns/contain/output"));
            btn_out.onClick       = btn_out_Onclick;
            btn_decompose         = new BaseButton(getTransformByPath("info/btns/contain/fenjie"));
            btn_decompose.onClick = btn_decompose_Onclick;
            btn_down              = new BaseButton(getTransformByPath("info/btns/contain/down"));
            btn_down.onClick      = btn_down_Onclick;

            name_txt           = getComponentByPath <Text>("info/name");
            image              = getGameObjectByPath("info/scrollview/Image");
            contain            = getGameObjectByPath("info/scrollview/contain");
            icon_obj           = getGameObjectByPath("info/icon");
            mask_btn           = new BaseButton(getTransformByPath("info/Mask"));
            mask_btn.onClick   = maskOnclick;
            nomask_btn         = new BaseButton(getTransformByPath("info/noMask"));
            nomask_btn.onClick = nomaskOnclick;
            mask   = mask_btn.gameObject;
            nomask = nomask_btn.gameObject;
        }
コード例 #2
0
 public override void init()
 {
     a3_runestonetip._instance = this;
     this.btn_close            = new BaseButton(base.getTransformByPath("bg"), 1, 1);
     this.btn_close.onClick    = new Action <GameObject>(this.closeOnclick);
     this.btn_sell             = new BaseButton(base.getTransformByPath("info/btns/contain/sell"), 1, 1);
     this.btn_sell.onClick     = new Action <GameObject>(this.btn_sell_Onclick);
     this.btn_dress            = new BaseButton(base.getTransformByPath("info/btns/contain/do"), 1, 1);
     this.btn_dress.onClick    = new Action <GameObject>(this.btn_dress_Onclick);
     this.btn_out               = new BaseButton(base.getTransformByPath("info/btns/contain/output"), 1, 1);
     this.btn_out.onClick       = new Action <GameObject>(this.btn_out_Onclick);
     this.btn_decompose         = new BaseButton(base.getTransformByPath("info/btns/contain/fenjie"), 1, 1);
     this.btn_decompose.onClick = new Action <GameObject>(this.btn_decompose_Onclick);
     this.btn_down              = new BaseButton(base.getTransformByPath("info/btns/contain/down"), 1, 1);
     this.btn_down.onClick      = new Action <GameObject>(this.btn_down_Onclick);
     this.name_txt              = base.getComponentByPath <Text>("info/name");
     this.image              = base.getGameObjectByPath("info/scrollview/Image");
     this.contain            = base.getGameObjectByPath("info/scrollview/contain");
     this.icon_obj           = base.getGameObjectByPath("info/icon");
     this.mask_btn           = new BaseButton(base.getTransformByPath("info/Mask"), 1, 1);
     this.mask_btn.onClick   = new Action <GameObject>(this.maskOnclick);
     this.nomask_btn         = new BaseButton(base.getTransformByPath("info/noMask"), 1, 1);
     this.nomask_btn.onClick = new Action <GameObject>(this.nomaskOnclick);
     this.mask   = this.mask_btn.gameObject;
     this.nomask = this.nomask_btn.gameObject;
 }