示例#1
0
        public override void init()
        {
            a3_teamInvitedPanel.mInstance = this;
            this.txtInfor = base.transform.FindChild("body/body/Text").GetComponent <Text>();
            this.txtCD    = base.transform.FindChild("body/body/txtCD").GetComponent <Text>();
            BaseButton baseButton  = new BaseButton(base.transform.FindChild("body/title/btnClose"), 1, 1);
            BaseButton baseButton2 = new BaseButton(base.transform.FindChild("body/bottom/btnOk"), 1, 1);
            BaseButton baseButton3 = new BaseButton(base.transform.FindChild("body/bottom/btnCancle"), 1, 1);

            baseButton3.onClick = new Action <GameObject>(this.onBtnCancleClick);
            baseButton.onClick  = new Action <GameObject>(this.onBtnCloseClick);
            baseButton2.onClick = new Action <GameObject>(this.onBtnOKClick);
        }
        override public void init()
        {
            mInstance = this;
            txtInfor  = transform.FindChild("body/body/Text").GetComponent <Text>();
            txtCD     = transform.FindChild("body/body/txtCD").GetComponent <Text>();
            BaseButton btnClose  = new BaseButton(transform.FindChild("body/title/btnClose"));
            BaseButton btnOk     = new BaseButton(transform.FindChild("body/bottom/btnOk"));
            BaseButton btnCancle = new BaseButton(transform.FindChild("body/bottom/btnCancle"));

            btnCancle.onClick = onBtnCancleClick;
            btnClose.onClick  = onBtnCloseClick;
            btnOk.onClick     = onBtnOKClick;


            getComponentByPath <Text>("body/title/Text").text            = ContMgr.getCont("a3_teamInvitedPanel_0");
            getComponentByPath <Text>("body/body/Text").text             = ContMgr.getCont("a3_teamInvitedPanel_1");
            getComponentByPath <Text>("body/bottom/btnOk/Text").text     = ContMgr.getCont("a3_teamInvitedPanel_2");
            getComponentByPath <Text>("body/bottom/btnCancle/Text").text = ContMgr.getCont("a3_teamInvitedPanel_3");
        }