| | |
| | | {
|
| | | 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);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | 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>");
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | m_DogzAssistCnt.text = Language.Get("TreasurePrivilege_Dogz_1", StringUtility.Contact(model.GetAssistDogzCount(), "/", model.DogzAssistDefaultCnt));
|
| | | UpdateDogzBtn();
|
| | | UpdateDogzProperty();
|
| | | }
|
| | | private void UpdateDogzBtn()
|
| | | {
|