Exemplo n.º 1
0
        private void GoodsTypeHandle()
        {
            UIToggle current = UIToggle.current;

            if (current.value)
            {
                current.FindInChild <UILabel>("label").color = Color.white;
                if (current.Equals(ckb_equip))
                {
                    showType = GoodsMode.GoodsType.Equip;
                }
                else if (current.Equals(ckb_prop))
                {
                    showType = GoodsMode.GoodsType.Other;
                }
                else if (current.Equals(ckb_pet))
                {
                    showType = GoodsMode.GoodsType.Pet;
                }
                else if (current.Equals(ckb_smelt))
                {
                    showType = GoodsMode.GoodsType.Smelt;
                }
                UpdateGoodsInfo();
            }
            else
            {
                current.FindInChild <UILabel>("label").color = ColorConst.FONT_GRAY;
            }
        }
Exemplo n.º 2
0
 private void UpdatePeiyuTips()
 {
     if (GrowMode.Instance.ShowTips && currentClickNavID != (int)NAVIGATION_TYPE.NAV_PEIYU)
     {
         ckb_peiyue.FindInChild <UISprite>("tips").SetActive(true);
     }
     else
     {
         ckb_peiyue.FindInChild <UISprite>("tips").SetActive(false);
     }
 }
Exemplo n.º 3
0
 private void UpdateBeibaoTips()
 {
     if (GoodsMode.Instance.ShowTips && currentClickNavID != (int)NAVIGATION_TYPE.NAV_BEIBAO)
     {
         ckb_beibao.FindInChild <UISprite>("tips").SetActive(true);
     }
     else
     {
         ckb_beibao.FindInChild <UISprite>("tips").SetActive(false);
     }
 }
Exemplo n.º 4
0
 //设置阶段切换按钮状态
 private void SetUIToggleState(UIToggle stageButton, bool state)
 {
     if (state)
     {
         stageButton.GetComponent <BoxCollider>().enabled = true;
         UIUtils.ChangeNormalShader(stageButton.FindInChild <UISprite>("background"), NORMAL_COPY_POINT_DEPTH);
     }
     else
     {
         stageButton.GetComponent <BoxCollider>().enabled = false;
         UIUtils.ChangeGrayShader(stageButton.FindInChild <UISprite>("background"), GRAY_COPY_POINT_DEPTH);
     }
 }
Exemplo n.º 5
0
        protected override void Init()
        {
            base.showTween = FindInChild <TweenPlay>();
            roleBackground = FindChild("rolebackground");
            repuGameObject = FindChild("Medal/repu");
            modelSpin      = NGUITools.FindInChild <SpinWithMouse>(roleBackground, "rolebackgroundl");
            EventDelegate.Add(base.showTween.onFinished, GoodsView.Instance.ResetGird);
            tweenPosition = FindInChild <TweenPosition>();
            ckb_shuxing   = FindInChild <UIToggle>("top/ckb_shuxing");
            ckb_shuxing.FindInChild <UILabel>("label").text = LanguageManager.GetWord("RoleView.PropertyTab");
            ckb_beibao = FindInChild <UIToggle>("top/ckb_beibao");
            ckb_beibao.FindInChild <UILabel>("label").text = LanguageManager.GetWord("RoleView.BagTab");
            ckb_peiyue = FindInChild <UIToggle>("top/ckb_peiyu");
            ckb_peiyue.FindInChild <UILabel>("label").text = LanguageManager.GetWord("RoleView.GrowTab");
            ckb_medal = FindInChild <UIToggle>("top/ckb_medal");
            ckb_medal.FindInChild <UILabel>("label").text = LanguageManager.GetWord("RoleView.MedalTab");

            btn_close = FindInChild <Button>("topright/btn_close");

            btn_close.clickDelegate += CloseView;

            EventDelegate.Add(ckb_medal.onChange, TabViewOnClick);
            EventDelegate.Add(ckb_shuxing.onChange, TabViewOnClick);
            EventDelegate.Add(ckb_peiyue.onChange, TabViewOnClick);
            EventDelegate.Add(ckb_beibao.onChange, TabViewOnClick);

            Singleton <GoodsView> .Instance.gameObject    = FindChild("Goods");
            Singleton <RolePropView> .Instance.gameObject = FindChild("Property");
            Singleton <GrowView> .Instance.gameObject     = FindChild("Grow");
            MedalView.Instance.gameObject = FindChild("Medal");
        }
Exemplo n.º 6
0
        private void SetControlButtonTips()
        {
            bool visible1 = btn_cw.gameObject.activeSelf && btn_cw.FindInChild <UISprite>("tips").gameObject.activeSelf;
            bool visible2 = btn_js.gameObject.activeSelf && btn_js.FindInChild <UISprite>("tips").gameObject.activeSelf;
            bool visible3 = btn_jyd.gameObject.activeSelf && btn_jyd.FindInChild <UISprite>("tips").gameObject.activeSelf;
            bool visible4 = btn_jscj.gameObject.activeSelf && btn_jscj.FindInChild <UISprite>("tips").gameObject.activeSelf;
            bool visible5 = btn_jn.gameObject.activeSelf && btn_jn.FindInChild <UISprite>("tips").gameObject.activeSelf;
            bool visible6 = btn_yxb.gameObject.activeSelf && btn_yxb.FindInChild <UISprite>("tips").gameObject.activeSelf;

            ckb_kongzhi.FindInChild <UISprite>("tips").SetActive(visible1 || visible2 || visible3 || visible4 || visible5 || visible6);
        }
Exemplo n.º 7
0
        private void TabViewOnClick()
        {
            RightTips.SetActive(false);
            UIToggle current = UIToggle.current;

            if (current.Equals(ckb_stren))           //强化
            {
                clickNavStren(current);
            }
            else if (current.Equals(ckb_inherit))            //继承
            {
                clickNavInherit(current);
            }
            else if (current.Equals(ckb_destroy))            //分解
            {
                clickNavDestory(current);
            }
            else if (current.Equals(ckb_refine))            //精炼
            {
                clickNavRefine(current);
            }
            else if (current.Equals(ckb_inlay))            //镶嵌
            {
                clickNavInlay(current);
            }
            else if (current.Equals(ckb_merge))            //充灵
            {
                clickNavMerge(current);
            }
            if (current.value == true)
            {
                current.FindInChild <UILabel>("label").color = Color.white;
            }
            else
            {
                current.FindInChild <UILabel>("label").color = ColorConst.FONT_GRAY;
            }
        }
Exemplo n.º 8
0
 protected override void HandleAfterOpenView()
 {
     UpdateGoodsInfo();
     UpdateEquipInfo();
     ckb_prop.value = true;
     GoodsControl.Instance.RequestWrapInfo(1);
     GoodsControl.Instance.RequestWrapInfo(2);
     zhanLi.text = LanguageManager.GetWord("Goods.FightPoint") + ": " + MeVo.instance.fightPoint;
     if (GoodsMode.Instance.ShowTips && showType != GoodsMode.GoodsType.Equip)
     {
         ckb_equip.FindInChild <UISprite>("tips").SetActive(true);
     }
     else
     {
         ckb_equip.FindInChild <UISprite>("tips").SetActive(false);
     }
 }
Exemplo n.º 9
0
        protected override void  Init()
        {
            ckb_equip = FindInChild <UIToggle>("ckb_equip");
            ckb_equip.FindInChild <UILabel>("label").text = LanguageManager.GetWord("GoodsView.EquipTab");
            ckb_smelt = FindInChild <UIToggle>("ckb_smelt");
            ckb_smelt.FindInChild <UILabel>("label").text = LanguageManager.GetWord("GoodsView.SmeltTab");
            ckb_pet = FindInChild <UIToggle>("ckb_pet");
            ckb_pet.FindInChild <UILabel>("label").text = LanguageManager.GetWord("GoodsView.PetTab");
            ckb_prop = FindInChild <UIToggle>("ckb_prop");
            ckb_prop.FindInChild <UILabel>("label").text = LanguageManager.GetWord("GoodsView.PropTab");

            btn_tujian = FindInChild <Button>("btn_tujian");

            EventDelegate.Add(ckb_equip.onChange, GoodsTypeHandle);
            EventDelegate.Add(ckb_smelt.onChange, GoodsTypeHandle);
            EventDelegate.Add(ckb_pet.onChange, GoodsTypeHandle);
            EventDelegate.Add(ckb_prop.onChange, GoodsTypeHandle);
            btn_tujian.onPress       = TuJianOnPress;
            btn_tujian.clickDelegate = TuJianClick;

            grid               = FindInChild <UIGrid>("content/grid");
            scrollView         = FindInChild <UIScrollView>("content");
            grid.onReposition += scrollView.ResetPosition;
            item               = FindChild("content/grid/item1");
            item.name          = "0000";
            ItemContainer ic = item.AddMissingComponent <ItemContainer>();

            ic.FindInChild <UILabel>("num").text = string.Empty;
            ic.onClick       = ShowRightTips;
            ic.onDoubleClick = RightDoubleClick;
            goodsList.Add(ic);
            item.SetActive(false);
            zhanLi = FindInChild <UILabel>("zl");

            GetLeftItemList();
        }
Exemplo n.º 10
0
        private void TabViewOnClick()
        {
            UIToggle current = UIToggle.current;

            if (current.Equals(ckb_beibao))
            {
                if (current.value == false)
                {
                    Singleton <GoodsView> .Instance.CloseView();
                }
                else
                {
                    currentClickNavID = (int)NAVIGATION_TYPE.NAV_BEIBAO;
                    Singleton <GoodsView> .Instance.OpenView();

                    SetModelPosition();
                }
            }
            else if (current.Equals(ckb_shuxing))
            {
                if (UIToggle.current.value == false)
                {
                    Singleton <RolePropView> .Instance.CloseView();
                }
                else
                {
                    currentClickNavID = (int)NAVIGATION_TYPE.NAV_SHUXING;
                    Singleton <RolePropView> .Instance.OpenView();

                    SetModelPosition();
                }
            }
            else if (UIToggle.current.Equals(ckb_medal))
            {
                if (UIToggle.current.value == false)
                {
                    MedalView.Instance.CloseView();
                }
                else
                {
                    bool isLimit = OpenLevelLimitManager.checkLeveByGuideLimitID(GuideType.GuideMedal, MeVo.instance.Level);
                    if (isLimit)
                    {
                        setClickNavState(currentClickNavID);
                        return;
                    }
                    currentClickNavID = (int)NAVIGATION_TYPE.NAV_XUNZHANG;
                    repuGameObject.SetActive(true);
                    MedalView.Instance.OpenView();
                    DisableModel();
                }
            }
            else if (current.Equals(ckb_peiyue))
            {
                if (current.value == false)
                {
                    Singleton <GrowView> .Instance.CloseView();
                }
                else
                {
                    bool isLimit = OpenLevelLimitManager.checkLeveByGuideLimitID(GuideType.GuideGrow, MeVo.instance.Level);
                    if (isLimit)
                    {
                        setClickNavState(currentClickNavID);
                        return;
                    }
                    currentClickNavID = (int)NAVIGATION_TYPE.NAV_PEIYU;
                    Singleton <GrowView> .Instance.OpenView();

                    SetModelPosition();
                }
            }
            if (current.value) //调整页签颜色
            {
                current.FindInChild <UILabel>("label").color = Color.white;
                //SetOtherFalse(current);
            }
            else
            {
                current.FindInChild <UILabel>("label").color = ColorConst.FONT_GRAY;
            }
            if (current.Equals(ckb_medal))
            {
                roleBackground.SetActive(false);
                repuGameObject.SetActive(true);
            }
            else
            {
                repuGameObject.SetActive(false);
                roleBackground.SetActive(true);
            }
            UpdateBeibaoTips();
            UpdatePeiyuTips();
        }