Example #1
0
        public override void init()
        {
            a3_hudun._instance        = this;
            this.btnClose             = new BaseButton(base.getTransformByPath("btn_close"), 1, 1);
            this.btnClose.onClick     = new Action <GameObject>(this.OnCLoseClick);
            this.btnUpLevel           = new BaseButton(base.getTransformByPath("ig_bg1/qianghua"), 1, 1);
            this.btnUpLevel.onClick   = new Action <GameObject>(this.UpLevel);
            this.btnAddEnergy         = new BaseButton(base.getTransformByPath("ig_bg1/chongneng"), 1, 1);
            this.btnAddEnergy.onClick = new Action <GameObject>(this.AddEnergy);
            new BaseButton(base.getTransformByPath("ig_bg1/help"), 1, 1).onClick        = new Action <GameObject>(this.onHelp);
            new BaseButton(base.getTransformByPath("ig_bg1/tishi/close"), 1, 1).onClick = new Action <GameObject>(this.close_tishi);
            this.huDunLevel = base.getComponentByPath <Text>("ig_bg1/top/topImage/Text");
            this.huDunCount = base.getComponentByPath <Text>("ig_bg1/top/shuzhi");
            this.mjCount    = base.getComponentByPath <Text>("ig_bg1/mjText/count");
            this.isAuto     = base.getComponentByPath <Toggle>("ig_bg1/Toggle");
            this.bar        = base.getComponentByPath <Image>("ig_bg1/bar/bar_n");
            this.isAuto.onValueChanged.AddListener(new UnityAction <bool>(this.add_isAuto));
            this.HudunModel = ModelBase <HudunModel> .getInstance();

            this.playerModel = ModelBase <PlayerModel> .getInstance();

            this.hudunProxy = BaseProxy <A3_HudunProxy> .getInstance();

            this.bagModel = ModelBase <a3_BagModel> .getInstance();

            this.hudunProxy.sendinfo(0);
            base.transform.FindChild("ig_bg_bg").gameObject.SetActive(false);
            this.updata_hd(this.HudunModel.NowCount);
            base.init();
        }
Example #2
0
        public override void init()
        {
            _instance            = this;
            btnClose             = new BaseButton(this.getTransformByPath("btn_close"));
            btnClose.onClick     = OnCLoseClick;
            btnUpLevel           = new BaseButton(this.getTransformByPath("ig_bg1/qianghua"));
            btnUpLevel.onClick   = UpLevel;
            btnAddEnergy         = new BaseButton(this.getTransformByPath("ig_bg1/chongneng"));
            btnAddEnergy.onClick = AddEnergy;
            new BaseButton(this.getTransformByPath("ig_bg1/help")).onClick        = onHelp;
            new BaseButton(this.getTransformByPath("ig_bg1/tishi/close")).onClick = close_tishi;


            huDunLevel = this.getComponentByPath <Text>("ig_bg1/top/topImage/Text");
            huDunCount = this.getComponentByPath <Text>("ig_bg1/top/shuzhi");
            mjCount    = this.getComponentByPath <Text>("ig_bg1/mjText/count");
            isAuto     = this.getComponentByPath <Toggle>("ig_bg1/Toggle");
            bar        = this.getComponentByPath <Image>("ig_bg1/bar/bar_n");
            isAuto.onValueChanged.AddListener(add_isAuto);

            HudunModel  = HudunModel.getInstance();
            playerModel = PlayerModel.getInstance();
            hudunProxy  = A3_HudunProxy.getInstance();
            bagModel    = a3_BagModel.getInstance();
            hudunProxy.sendinfo(0);
            transform.FindChild("ig_bg_bg").gameObject.SetActive(false);
            updata_hd(HudunModel.NowCount);
            base.init();
        }
Example #3
0
 public override void onClosed()
 {
     a3_hudun.isshow = null;
     this.disposeAvatar();
     InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_NORMAL);
     base.onClosed();
     GRMap.GAME_CAMERA.SetActive(true);
 }
Example #4
0
 public override void onShowed()
 {
     a3_hudun.isshow = this;
     this.updata_hd(this.HudunModel.NowCount);
     this.showbtnUpLevel();
     InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_FUNCTIONBAR);
     base.onShowed();
     GRMap.GAME_CAMERA.SetActive(false);
     this.createSence();
     this.createShield();
 }
Example #5
0
        //void showCam()
        //{
        //    if (isshow != null)
        //    {
        //        createSence();
        //        createShield();
        //    }
        //}
        public override void onClosed()
        {
            isshow = null;
            //a3_herohead.instance.refreshSheild();

            disposeAvatar();
            InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_NORMAL);
            base.onClosed();

            GRMap.GAME_CAMERA.SetActive(true);
        }
Example #6
0
        public override void onShowed()
        {
            isshow = this;

            updata_hd(HudunModel.NowCount);
            showbtnUpLevel();

            InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_FUNCTIONBAR);
            base.onShowed();

            GRMap.GAME_CAMERA.SetActive(false);
            createSence();
            createShield();
            //CancelInvoke("showCam");
            //Invoke("showCam", 0.2f);
        }