少年修仙传客户端代码仓库
client_Hale
2018-09-20 1a3098212d90ec1fc3e5bb324c445272b34c012b
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()
        {