少年修仙传客户端代码仓库
client_Zxw
2018-09-28 467a762c6aa9eedc91f7417a685d4bc0ac55a990
2614 【前端】神兽——强化功能
1个文件已修改
31 ■■■■ 已修改文件
System/Strengthening/GodBeastAttributes.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Strengthening/GodBeastAttributes.cs
@@ -40,6 +40,9 @@
        [SerializeField] Button m_StrengthenDoubleBtn;//双倍强化按钮
        [SerializeField] Text m_NeedFairy;//所需的仙玉
        [SerializeField] GameObject m_BottomBox;
        [SerializeField] Text m_Text_Attributes3;
        [SerializeField] Text m_Text_Attributes4;
        DogzModel Dogz_model;
        DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
        PlayerPackModel _playerPack;
@@ -72,6 +75,8 @@
            }
            GodBeastReinforcementWin.ChooseToModify += ChooseToModify;
            godBeastModel.AbsorbEvent += AbsorbEvent;
            m_Text_Attributes3.gameObject.SetActive(false);
            m_Text_Attributes4.gameObject.SetActive(false);
        }
        private void OnDisable()
        {
@@ -286,6 +291,8 @@
                m_FullLevel.SetActive(false);
                m_UIAlphaTween.gameObject.SetActive(false);
                m_BottomBox.SetActive(false);
                m_Text_Attributes3.gameObject.SetActive(false);
                m_Text_Attributes4.gameObject.SetActive(false);
            }
        }
@@ -327,7 +334,8 @@
                }
                else
                {
                    m_Text_Attributes3.gameObject.SetActive(false);
                    m_Text_Attributes4.gameObject.SetActive(false);
                    m_StrengthenDoubleBtn.interactable = true;
                    m_StrengthenBtn.interactable = true;
                    m_Text_two.SetActive(true);
@@ -348,6 +356,8 @@
            }
            else
            {
                m_Text_Attributes3.gameObject.SetActive(false);
                m_Text_Attributes4.gameObject.SetActive(false);
                if (m_DoubleToggle.isOn)
                {
                    m_StrengthenBtn.gameObject.SetActive(false);
@@ -596,25 +606,28 @@
        }
        private void FullLevelAttributes()//设置满级属性
        {
            m_TextAttributes1.gameObject.SetActive(false);
            m_TextAttributesAdd1.gameObject.SetActive(false);
            m_TextAttributes2.gameObject.SetActive(false);
            m_TextAttributesAdd2.gameObject.SetActive(false);
            var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, DogZLv);
            int[] AttType = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attType);
            int[] AttValue = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attValue);
            m_TextAttributesAdd1.gameObject.SetActive(false);
            m_TextAttributesAdd2.gameObject.SetActive(false);
            if (AttType.Length > 1)
            {
                m_TextAttributes1.gameObject.SetActive(true);
                m_TextAttributes2.gameObject.SetActive(true);
                m_Text_Attributes3.gameObject.SetActive(true);
                m_Text_Attributes4.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_Text_Attributes3.text = StrName1 + ":" + AttValue[0];
                m_Text_Attributes4.text = StrName2 + ":" + AttValue[1];
            }
            else
            {
                m_TextAttributes2.gameObject.SetActive(false);
                m_Text_Attributes3.gameObject.SetActive(true);
                m_Text_Attributes4.gameObject.SetActive(false);
                string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
                m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
                m_Text_Attributes3.text = StrName1 + ":" + AttValue[0];
            }
        }
    }