少年修仙传客户端代码仓库
client_Zxw
2018-08-27 65fd48d1dc7336d829e82ef70b082ee5081aee2f
[2614]神兽开发
2个文件已修改
103 ■■■■■ 已修改文件
System/Strengthening/GodBeastAttributes.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastSlidingList.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastAttributes.cs
@@ -32,6 +32,9 @@
        [SerializeField] Toggle m_DoubleToggle;
        [SerializeField] Button m_StrengthenBtn;
        [SerializeField] UIAlphaTween m_UIAlphaTween;
        [SerializeField] Slider m_Slider;
        DogzModel Dogz_model;
        DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
        private Dictionary<int, int> QualityLimit = new Dictionary<int, int>();
@@ -163,6 +166,7 @@
                    m_ExpSlider.delay = 0f;
                    m_ExpSlider.ResetStage();
                    m_ExpSlider.value = 1;
                    m_Slider.gameObject.SetActive(false);
                    m_ExpNum.text = DogzEquipConfig.upExpTotal + "/" + DogzEquipConfig.upExpTotal;
                }
                else
@@ -235,13 +239,70 @@
                m_LvNextText.text = "+"+toLv.ToString();
            }
            var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, DogZLv);
            int[] AttType = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attType);
            int[] AttValue = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attValue);
            if (ToExpTotal == 0)
            {
                m_Slider.gameObject.SetActive(false);
                m_TextAttributesAdd1.gameObject.SetActive(false);
                m_TextAttributesAdd2.gameObject.SetActive(false);
                m_ExpNum.text = DogZExp + "/" + DogzEquipConfig.upExpTotal;
                if (AttType.Length > 1)
                {
                    m_TextAttributes1.gameObject.SetActive(true);
                    m_TextAttributes2.gameObject.SetActive(true);
                    string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
                    string StrName2 = Config.Instance.Get<PlayerPropertyConfig>(AttType[1]).Name;
                    m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
                    m_TextAttributes2.text = StrName2 + ":" + AttValue[1];
            }
            else
            {
                m_ExpNum.text = DogZExp + "+" + ToExpTotal + "/" + DogzEquipConfig.upExpTotal;
                    m_TextAttributes2.gameObject.SetActive(false);
                    string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
                    m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
                }
            }
            else
            {
                m_Slider.gameObject.SetActive(true);
                if (DogZExp + ToExpTotal >= DogzEquipConfig.upExpTotal)
                {
                    m_Slider.value = 1f;
                }
                else
                {
                    m_Slider.value = (float)(DogZExp + ToExpTotal) / (float)(DogzEquipConfig.upExpTotal);
                }
                m_UIAlphaTween.Play();
                var DogzEquipToConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, toLv);
                int[] AttTypeTo = ConfigParse.GetMultipleStr<int>(DogzEquipToConfig.attType);
                int[] AttValueTo = ConfigParse.GetMultipleStr<int>(DogzEquipToConfig.attValue);
                string strColor = string.Format(Language.Get("DogzGreenText"), ToExpTotal);
                m_ExpNum.text = DogZExp +strColor+ "/" + DogzEquipConfig.upExpTotal;
                if (AttType.Length > 1)
                {
                    m_TextAttributes1.gameObject.SetActive(true);
                    m_TextAttributes2.gameObject.SetActive(true);
                    m_TextAttributesAdd1.gameObject.SetActive(true);
                    m_TextAttributesAdd2.gameObject.SetActive(true);
                    string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
                    string StrName2 = Config.Instance.Get<PlayerPropertyConfig>(AttType[1]).Name;
                    m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
                    m_TextAttributes2.text = StrName2 + ":" + AttValue[1];
                    m_TextAttributesAdd1.text = "+" +( AttValueTo[0] - AttValue[0]);
                    m_TextAttributesAdd2.text = "+" + (AttValueTo[1] - AttValue[1]);
                }
                else
                {
                    m_TextAttributes1.gameObject.SetActive(true);
                    m_TextAttributesAdd1.gameObject.SetActive(true);
                    m_TextAttributes2.gameObject.SetActive(false);
                    m_TextAttributesAdd2.gameObject.SetActive(false);
                    string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
                    m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
                    m_TextAttributesAdd1.text = "+" + (AttValueTo[0] - AttValue[0]);
                }
            }
        }
System/Strengthening/GodBeastSlidingList.cs
@@ -132,11 +132,13 @@
        }
        private void OnEnable()
        {
            playerPack.RefreshItemCountAct += RefreshItemCountAct;
            playerPack.ItemCntReduceAct += ItemCntReduceAct;
        }
        private void OnDisable()
        {
            playerPack.RefreshItemCountAct -= RefreshItemCountAct;
            playerPack.ItemCntReduceAct -= ItemCntReduceAct;
        }
        public void Init()
@@ -162,7 +164,41 @@
        {
            m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
        }
        private void ItemCntReduceAct(PackType arg1, int arg2, int arg3)
        {
            if (arg1 == PackType.rptDogzItem)
            {
                if (m_ToggleAll.isOn)
                {
                    m_ToggleAll.isOn = false;
                }
                GetGodBeastBag();
                FilterQuality();
                m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
                if (AbsorbEvent != null)
                {
                    AbsorbEvent(AbsorptionDic);
                }
            }
        }
        private void RefreshItemCountAct(PackType arg1, int arg2, int arg3)
        {
            if (arg1 == PackType.rptDogzItem)
            {
                if (m_ToggleAll.isOn)
                {
                    m_ToggleAll.isOn = false;
                }
                GetGodBeastBag();
                FilterQuality();
                m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
                if (AbsorbEvent != null)
                {
                    AbsorbEvent(AbsorptionDic);
                }
            }
        }
        private void GetGodBeastBag()//获取神兽背包数据排序
        {
            GodBeastBagList.Clear();