public string DebugStats() { System.Text.StringBuilder sb = new System.Text.StringBuilder(); foreach (var stat in _dict) { sb.AppendNewLine(stat.Value.ToString()); } Debug.Log(sb.ToString()); return(sb.ToString()); }
public SkillStat(int owner, DataEntry data, string label, string id, float baseValue) : base(owner, label, id, baseValue) { _data = data; SkillDescription = data.GetValue <string>(DatabaseFields.Description); var list = data.Get <DataList>("Ranks"); if (list == null) { RankDescription = "Error no ranks list"; return; } System.Text.StringBuilder sb = new System.Text.StringBuilder(); for (int i = 0; i < list.Count; i++) { var line = list[i]; sb.AppendNewLine("<b>"); sb.Append(line.TryGetValue("Rank", "None")); sb.AppendNewLine("</b> "); sb.AppendNewLine(line.GetValue <string>(DatabaseFields.Description)); } RankDescription = sb.ToString(); }