少年修仙传客户端代码仓库
Client_PangDeRong
2018-09-20 52392b6c101d80054e4dd05e492d4cbb6b10acc3
1885 神兽功能开发
2个文件已修改
37 ■■■■ 已修改文件
System/Dogz/DogzActiveWin.cs 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/UIHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzActiveWin.cs
@@ -178,21 +178,25 @@
            {
                m_PropertyTypes[i].gameObject.SetActive(i < _dogzCfg.BaseAttrTypes.Length);
                m_PropertyValues[i].gameObject.SetActive(i < _dogzCfg.BaseAttrTypes.Length);
                string addAttrStr = "";
                string baseAttrStr = "";
                if (i < _dogzCfg.BaseAttrTypes.Length)
                {
                    var _propertyCfg = Config.Instance.Get<PlayerPropertyConfig>(_dogzCfg.BaseAttrTypes[i]);
                    m_PropertyTypes[i].text = _propertyCfg.Name;
                    int attrValue = _dogzCfg.BaseAttrValues[i];
                    if (isAddAttr && model.m_DogzEquipAttrDict[_propertyCfg.ID] > 0)
                    {
                        m_PropertyValues[i].text = StringUtility.Contact(UIHelper.ReplacePercentage(_dogzCfg.BaseAttrValues[i], _propertyCfg.ISPercentage)
                      , _propertyCfg.ISPercentage == 1 ? "%" : string.Empty,"+",UIHelper.ReplacePercentage(model.m_DogzEquipAttrDict[_propertyCfg.ID], _propertyCfg.ISPercentage)
                        baseAttrStr = StringUtility.Contact(UIHelper.ReplacePercentage(_dogzCfg.BaseAttrValues[i], _propertyCfg.ISPercentage)
                      , _propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
                        addAttrStr = StringUtility.Contact("+", UIHelper.ReplacePercentage(model.m_DogzEquipAttrDict[_propertyCfg.ID], _propertyCfg.ISPercentage)
                   , _propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
                    }
                    else
                    {
                        m_PropertyValues[i].text = StringUtility.Contact(UIHelper.ReplacePercentage(_dogzCfg.BaseAttrValues[i], _propertyCfg.ISPercentage)
                        baseAttrStr = StringUtility.Contact(UIHelper.ReplacePercentage(_dogzCfg.BaseAttrValues[i], _propertyCfg.ISPercentage)
                      , _propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
                    }
                  
@@ -200,13 +204,27 @@
                if(model.TryGetAssistDogzState(model.presentSelectDogz))
                {
                    m_PropertyTypes[i].material = MaterialUtility.GetUIDefaultGraphicMaterial();
                    m_PropertyValues[i].material = MaterialUtility.GetUIDefaultGraphicMaterial();
                    m_PropertyTypes[i].color = UIHelper.s_NavyBrown;
                    if(addAttrStr != "")
                    {
                        m_PropertyValues[i].text = StringUtility.Contact("<color=#401c06>", baseAttrStr, "</color>", "<color=#109d06>", addAttrStr, "</color>");
                    }
                    else
                    {
                        m_PropertyValues[i].text = StringUtility.Contact("<color=#401c06>", baseAttrStr, "</color>");
                    }
                }
                else
                {
                    m_PropertyTypes[i].material = MaterialUtility.GetDefaultSpriteGrayMaterial();
                    m_PropertyValues[i].material = MaterialUtility.GetDefaultSpriteGrayMaterial();
                    m_PropertyTypes[i].color = UIHelper.s_BrightWhiteColor;
                    if (addAttrStr != "")
                    {
                        m_PropertyValues[i].text = StringUtility.Contact("<color=#686868>", baseAttrStr, "</color>", "<color=#109d06>", addAttrStr, "</color>");
                    }
                    else
                    {
                        m_PropertyValues[i].text = StringUtility.Contact("<color=#686868>", baseAttrStr, "</color>");
                    }
                }
            }
        }
@@ -215,6 +233,7 @@
            m_Controller.m_Scorller.RefreshActiveCellViews();
            m_DogzAssistCnt.text = Language.Get("TreasurePrivilege_Dogz_1", StringUtility.Contact(model.GetAssistDogzCount(), "/", model.DogzAssistDefaultCnt));
            UpdateDogzBtn();
            UpdateDogzProperty();
        }
        private void UpdateDogzBtn()
        {
Utility/UIHelper.cs
@@ -359,7 +359,7 @@
    public static readonly Color32 s_BrightBlueColor = new Color32(0, 107, 227, 255);
    public static readonly Color32 s_BrightOrangeColor = new Color32(255, 103, 1, 255); //FF6701FF
    public static readonly Color32 s_BrightWhiteColor = new Color32(104, 104, 104, 255); //686868
    public static readonly Color32 s_BrightGreenColor = new Color32(16, 157, 6, 255);
    public static readonly Color32 s_BrightGreenColor = new Color32(16, 157, 6, 255); //109d06
    public static readonly Color32 s_DarkPinkColor = new Color32(255, 124, 124, 255);
    public static readonly Color32 s_DarkRedColor = new Color32(250, 1, 1, 255);