| | |
| | | } |
| | | |
| | | var starConfigs = EquipStarConfig.GetConfigs(starInfo.equipPosition.x, starInfo.equipPosition.y); |
| | | for (int i = starConfigs.Count - 1; i >= 0; i--) |
| | | var levelUpProperties = new Dictionary<int, Int2>(); |
| | | var prePropertiesCount = 0; |
| | | foreach (var config in starConfigs) |
| | | { |
| | | var config = starConfigs[i]; |
| | | if (config.Star > starInfo.maxLevel) |
| | | if (config.StarAttrInfo.Length > prePropertiesCount) |
| | | { |
| | | starConfigs.RemoveAt(i); |
| | | var length = config.StarAttrInfo.Length; |
| | | levelUpProperties[config.Star] = config.StarAttrInfo[length - 1]; |
| | | prePropertiesCount = config.StarAttrInfo.Length; |
| | | } |
| | | } |
| | | |
| | | var lines = new List<string>(); |
| | | for (int i = 0; i < starConfigs.Count; i++) |
| | | foreach ( var item in levelUpProperties ) |
| | | { |
| | | var config = starConfigs[i]; |
| | | var actived = starInfo.starLevel >= config.Star; |
| | | var star = item.Key; |
| | | var property = item.Value; |
| | | var actived = starInfo.starLevel >= item.Key; |
| | | var description = PlayerPropertyConfig.GetFullDescription(property.x, property.y); |
| | | |
| | | if (actived) |
| | | { |
| | | foreach (var property in config.StarAttrInfo) |
| | | { |
| | | var propertyConfig = PlayerPropertyConfig.Get(property.x); |
| | | var description = string.Format("{0} +{1}", propertyConfig.Name, PlayerPropertyConfig.GetValueDescription(property.x, property.y)); |
| | | lines.Add(UIHelper.AppendColor(TextColType.Green, description)); |
| | | } |
| | | lines.Add(UIHelper.AppendColor(TextColType.Green, description)); |
| | | } |
| | | else |
| | | { |
| | | foreach (var property in config.StarAttrInfo) |
| | | { |
| | | var propertyConfig = PlayerPropertyConfig.Get(property.x); |
| | | var description = string.Format("{0} +{1} ({2}星激活)", propertyConfig.Name, PlayerPropertyConfig.GetValueDescription(property.x, property.y), config.Star); |
| | | lines.Add(UIHelper.AppendColor(TextColType.Gray, description)); |
| | | } |
| | | lines.Add(UIHelper.AppendColor(TextColType.Gray, string.Format("{0}({1}星激活)", description, star))); |
| | | } |
| | | } |
| | | |