| | |
| | |
|
| | | public void Display(int _property, int _value)
|
| | | {
|
| | | var config = PlayerPropertyConfig.Get(_property);
|
| | | if (config != null)
|
| | | {
|
| | | m_PropertyName.text = config.Name;
|
| | | m_PropertyValue.text = StringUtility.Contact(
|
| | | UIHelper.ReplaceLargeNum(UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | }
|
| | | m_PropertyName.text = GetPropertyName(_property);
|
| | | m_PropertyValue.text = GetValueLabel(_property, _value);
|
| | | }
|
| | |
|
| | | public void DisplayUpper(int _property, int _value)
|
| | | {
|
| | | var config = PlayerPropertyConfig.Get(_property);
|
| | | if (config != null)
|
| | | {
|
| | | m_PropertyName.text = config.Name;
|
| | | m_PropertyValue.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(
|
| | | UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | }
|
| | | }
|
| | |
|
| | | public void DisplayColon(int _property, int _value)
|
| | | {
|
| | | var config = PlayerPropertyConfig.Get(_property);
|
| | | if (config != null)
|
| | | {
|
| | | m_PropertyName.text = StringUtility.Contact(config.Name, ":");
|
| | | m_PropertyValue.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(
|
| | | UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | }
|
| | | m_PropertyName.text = GetPropertyName(_property);
|
| | | m_PropertyValue.text = GetAddValueLabel(_property, _value);
|
| | | }
|
| | |
|
| | | public void DisplayAdd(int _property, int _value, int _add)
|
| | | {
|
| | | var config = PlayerPropertyConfig.Get(_property);
|
| | | if (config != null)
|
| | | {
|
| | | m_PropertyName.text = StringUtility.Contact(config.Name, ":");
|
| | | m_PropertyValue.text = StringUtility.Contact(UIHelper.ReplaceLargeNum(
|
| | | UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | if (_add == 0)
|
| | | {
|
| | | m_PropertyAdd.text = string.Empty;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PropertyAdd.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(
|
| | | UIHelper.ReplacePercentage(_add, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | }
|
| | | }
|
| | | m_PropertyName.text = StringUtility.Contact(GetPropertyName(_property), ":");
|
| | | m_PropertyValue.text = GetValueLabel(_property, _value);
|
| | | DisplayAddLabel(_property, _add);
|
| | | }
|
| | |
|
| | | public void DisplayGodWeaponAdd(int _property, int _value, int _add)
|
| | | {
|
| | | var config = PlayerPropertyConfig.Get(_property);
|
| | | if (config != null)
|
| | | {
|
| | | m_PropertyName.text = config.Name;
|
| | | m_PropertyValue.text = StringUtility.Contact(UIHelper.ReplaceLargeNum(
|
| | | UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | if (_add == 0)
|
| | | {
|
| | | m_PropertyAdd.text = string.Empty;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PropertyAdd.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(
|
| | | UIHelper.ReplacePercentage(_add, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void DisplayCompare(int _property, int _value, int _add)
|
| | | {
|
| | | var config = PlayerPropertyConfig.Get(_property);
|
| | | if (config != null)
|
| | | {
|
| | | m_PropertyName.text = config.Name;
|
| | | m_PropertyValue.text = StringUtility.Contact(UIHelper.ReplaceLargeNum(
|
| | | UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | m_PropertyAdd.text = StringUtility.Contact(UIHelper.ReplaceLargeNum(
|
| | | UIHelper.ReplacePercentage(_add, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | }
|
| | | m_PropertyName.text = GetPropertyName(_property);
|
| | | m_PropertyValue.text = GetValueLabel(_property, _value);
|
| | | DisplayAddLabel(_property, _add);
|
| | | }
|
| | |
|
| | | public void DisplayUp(int _property, int _value, int _add)
|
| | | {
|
| | | var config = PlayerPropertyConfig.Get(_property);
|
| | | if (config != null)
|
| | | {
|
| | | m_PropertyName.text = config.Name;
|
| | | m_PropertyValue.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(
|
| | | UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | if (_add == 0)
|
| | | {
|
| | | m_PropertyAdd.text = string.Empty;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PropertyAdd.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(
|
| | | UIHelper.ReplacePercentage(_add, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | }
|
| | | }
|
| | | m_PropertyName.text = GetPropertyName(_property);
|
| | | m_PropertyValue.text = GetAddValueLabel(_property, _value);
|
| | | DisplayAddLabel(_property, _add);
|
| | | }
|
| | |
|
| | | public void DisplayGem(int _property, int _value)
|
| | | {
|
| | | var config = PlayerPropertyConfig.Get(_property);
|
| | | m_PropertyName.text = GetPropertyName(_property);
|
| | | m_PropertyValue.text = StringUtility.Contact("+",
|
| | | PlayerPropertyConfig.GetPropertyDescription(_property, _value, 2, false));
|
| | | }
|
| | |
|
| | | string GetPropertyName(int property)
|
| | | {
|
| | | var config = PlayerPropertyConfig.Get(property);
|
| | | if (config != null)
|
| | | {
|
| | | m_PropertyName.text = config.Name;
|
| | | m_PropertyValue.text = StringUtility.Contact("+", UIHelper.ReplacePercentage(_value,
|
| | | config.ISPercentage, config.ISPercentage == 1 ? 2 : 1), config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | return config.Name;
|
| | | }
|
| | | return string.Empty;
|
| | | }
|
| | |
|
| | | void DisplayAddLabel(int _property, int _value)
|
| | | {
|
| | | if (_value == 0)
|
| | | {
|
| | | m_PropertyAdd.text = string.Empty;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PropertyAdd.text = GetAddValueLabel(_property, _value);
|
| | | }
|
| | | }
|
| | |
|
| | | string GetAddValueLabel(int _property, int _value)
|
| | | {
|
| | | return StringUtility.Contact("+", GetValueLabel(_property, _value));
|
| | | }
|
| | |
|
| | | string GetValueLabel(int _property, int _value)
|
| | | {
|
| | | var decimalCount = UIHelper.GetPropertyDecimalCount(_property);
|
| | | return PlayerPropertyConfig.GetPropertyDescription(_property, _value, decimalCount, true);
|
| | | }
|
| | |
|
| | | public void SetColor(TextColType colorType, bool bright)
|