Beispiel #1
0
        private void doGetExp(GameEvent e)
        {
            off_line_exp expr_06 = off_line_exp.instance;
            bool         flag    = expr_06 != null && expr_06.offline;

            if (flag)
            {
                bool flag2 = off_line_exp.instance.offline_item != null;
                if (flag2)
                {
                    foreach (a3_BagItemData current in off_line_exp.instance.offline_item)
                    {
                        a3_ItemData itemDataById = ModelBase <a3_BagModel> .getInstance().getItemDataById(current.tpid);

                        GameObject showIcon = IconImageMgr.getInstance().createA3ItemIconTip(current.tpid, false, current.num, 1f, false, -1, 0, false, false, false);
                        flytxt.instance.fly(null, 6, default(Color), showIcon);
                    }
                }
                off_line_exp.instance.offline = false;
                off_line_exp.instance.offline_item.Clear();
            }
            Variant data = e.data;
            int     num  = data["res"];

            this.offLineModel.OffLineTime = 0;
            this.offLineModel.BaseExp     = 0;
            debug.Log("离线经验的服务器反馈" + e.data.dump());
            InterfaceMgr.getInstance().close(InterfaceMgr.OFFLINEEXP);
        }
Beispiel #2
0
 public override void init()
 {
     base.init();
     off_line_exp.instance      = this;
     this.contain               = base.getGameObjectByPath("equp/scroll/contain").transform;
     this.eqp_icon              = base.getGameObjectByPath("icon");
     this.left_click            = new BaseButton(base.transform.FindChild("r_l_btn/left"), 1, 1);
     this.right_click           = new BaseButton(base.transform.FindChild("r_l_btn/right"), 1, 1);
     this.Text_exp              = base.transform.FindChild("exp_bg/exp").gameObject.GetComponent <Text>();
     this.fenjie                = base.getComponentByPath <Toggle>("Toggle_fenjie");
     this.btn1                  = new BaseButton(base.transform.FindChild("exp/btn1/btn"), 1, 1);
     this.btn2                  = new BaseButton(base.transform.FindChild("exp/btn2/btn"), 1, 1);
     this.btn3                  = new BaseButton(base.transform.FindChild("exp/btn3/btn"), 1, 1);
     this.btn4                  = new BaseButton(base.transform.FindChild("exp/btn4/btn"), 1, 1);
     this.closeBtn1             = new BaseButton(base.transform.FindChild("closeBtn"), 1, 1);
     this.Text_time             = base.getComponentByPath <Text>("state/Text_time");
     this.timeSlider            = base.transform.FindChild("state/time_Slider/Fill Area/Fill").GetComponent <Image>();
     this.timeSlider.type       = Image.Type.Filled;
     this.timeSlider.fillMethod = Image.FillMethod.Vertical;
     this.timeSlider.fillOrigin = 0;
     this.vip_getexp_btn();
     this.btn1.onClick = delegate(GameObject go)
     {
         this.OnClickToGetExp(1);
     };
     this.btn2.onClick = delegate(GameObject go)
     {
         this.OnClickToGetExp(2);
     };
     this.btn3.onClick = delegate(GameObject go)
     {
         this.OnClickToGetExp(3);
     };
     this.btn4.onClick = delegate(GameObject go)
     {
         this.OnClickToGetExp(4);
     };
     this.left_click.onClick = delegate(GameObject go)
     {
         this.OnClick_left();
     };
     this.right_click.onClick = delegate(GameObject go)
     {
         this.OnClick_right();
     };
     this.closeBtn1.onClick = delegate(GameObject go)
     {
         this.OnClickToClose();
     };
     this.recharge = base.transform.FindChild("recharge").gameObject;
     this.lBtn.Add(this.btn1);
     this.lBtn.Add(this.btn2);
     this.lBtn.Add(this.btn3);
     this.lBtn.Add(this.btn4);
     this.lBtn2.Add(this.closeBtn1);
     this.lBtn2.Add(this.left_click);
     this.lBtn2.Add(this.right_click);
     this.offLineModel = ModelBase <OffLineModel> .getInstance();
 }
Beispiel #3
0
        public override void init()
        {
            base.init();
            instance    = this;
            contain     = getGameObjectByPath("equp/scroll/contain").transform;
            eqp_icon    = getGameObjectByPath("icon");
            left_click  = new BaseButton(transform.FindChild("r_l_btn/left"));
            right_click = new BaseButton(transform.FindChild("r_l_btn/right"));//getGameObjectByPath("r_l_btn/right").GetComponent<BaseButton>();

            Text_exp = transform.FindChild("exp_bg/exp").gameObject.GetComponent <Text>();
            fenjie   = getComponentByPath <Toggle>("Toggle_fenjie");
            //fenjie.onValueChanged.AddListener(delegate (bool ison)
            //{
            //    if (ison) { EquipsSureSell();/* OnLoadItem_fenjie();*/ }
            //    else { outItemCon_fenjie(); /*EquipsNoSell(1);*/ }
            //});


            btn1      = new BaseButton(transform.FindChild("exp/btn1/btn"));
            btn2      = new BaseButton(transform.FindChild("exp/btn2/btn"));
            btn3      = new BaseButton(transform.FindChild("exp/btn3/btn"));
            btn4      = new BaseButton(transform.FindChild("exp/btn4/btn"));
            closeBtn1 = new BaseButton(transform.FindChild("closeBtn"));

            Text_time = this.getComponentByPath <Text>("state/Text_time");
            //timeSlider = this.getComponentByPath<Slider>("state/time_Slider");
            timeSlider            = transform.FindChild("state/time_Slider/Fill Area/Fill").GetComponent <Image>();
            timeSlider.type       = Image.Type.Filled;
            timeSlider.fillMethod = Image.FillMethod.Vertical;
            timeSlider.fillOrigin = (int)Image.OriginVertical.Bottom;

            vip_getexp_btn();
            btn1.onClick        = delegate(GameObject go) { OnClickToGetExp(1); };
            btn2.onClick        = delegate(GameObject go) { OnClickToGetExp(2); };
            btn3.onClick        = delegate(GameObject go) { OnClickToGetExp(3); };
            btn4.onClick        = delegate(GameObject go) { OnClickToGetExp(4); };
            left_click.onClick  = delegate(GameObject go) { OnClick_left(); };
            right_click.onClick = delegate(GameObject go) { OnClick_right(); };
            closeBtn1.onClick   = delegate(GameObject go) { OnClickToClose(); };
            recharge            = transform.FindChild("recharge").gameObject;
            lBtn.Add(btn1);
            lBtn.Add(btn2);
            lBtn.Add(btn3);
            lBtn.Add(btn4);
            lBtn2.Add(closeBtn1);
            lBtn2.Add(left_click);
            lBtn2.Add(right_click);
            offLineModel = OffLineModel.getInstance();

            //btn3.transform.FindChild("Text").GetComponent<Text>().text = "VIP" + vip_lite(3) + "领取";
            //btn4.transform.FindChild("Text").GetComponent<Text>().text = "VIP" + vip_lite(4) + "领取";
            //if (PlayerModel.getInstance().last_time == 0)
            //{
            //    transform.FindChild("equp/image_con").gameObject.SetActive(true);
            //}
            //Debug.LogError(PlayerModel.getInstance().havePet + "sss" + PlayerModel.getInstance().last_time);
            //OffLineExpProxy.getInstance().Send_Off_Line(0);
            //OffLineExpProxy.getInstance().sendType(0);

            #region 初始化汉字提取
            getComponentByPath <Text>("exp/btn1/Text").text         = ContMgr.getCont("off_line_exp_0");
            getComponentByPath <Text>("exp/btn2/btn/TextOnee").text = ContMgr.getCont("off_line_exp_1");
            getComponentByPath <Text>("state/Text_des").text        = ContMgr.getCont("off_line_exp_2");
            getComponentByPath <Text>("state/Text_desc_1").text     = ContMgr.getCont("off_line_exp_3");
            getComponentByPath <Text>("exp_bg/text").text           = ContMgr.getCont("off_line_exp_4");
            getComponentByPath <Text>("recharge/Text").text         = ContMgr.getCont("off_line_exp_5");
            getComponentByPath <Text>("recharge/yes/Text").text     = ContMgr.getCont("off_line_exp_6");
            getComponentByPath <Text>("Toggle_fenjie/Label").text   = ContMgr.getCont("piliang_fenjie_0");
            getComponentByPath <Text>("equp/image_con/text").text   = ContMgr.getCont("off_line_exp_7");
            getComponentByPath <Text>("btn/btn1/text").text         = ContMgr.getCont("off_line_exp_8");
            getComponentByPath <Text>("btn/btn2/text").text         = ContMgr.getCont("off_line_exp_9");

            getComponentByPath <Text>("exp/btn1/btn/Text").text        = ContMgr.getCont("off_line_exp_1");
            getComponentByPath <Text>("exp/btn3/btn/image1/Text").text = ContMgr.getCont("off_line_exp_1");
            getComponentByPath <Text>("exp/btn4/btn/image1/Text").text = ContMgr.getCont("off_line_exp_1");

            #endregion
        }