private static ContentBox[] loadRaceMods(TraitBase race) { ContentBox[] result = new ContentBox[2]; result[1] = new ContentBox(); result[0] = new ContentBox(); result[0].title = "Stat Mods"; result[0].content = new List <string>(); result[0].currentChoice = -1; result[1].title = "Trait Mods"; result[1].content = new List <string>(); result[1].currentChoice = -1; foreach (string stat in race.skillMods) { string[] _stat = stat.Split(":"); string[] stats = Enum.GetNames(typeof(Enums.Skills)); for (int i = 0; i < stats.Length; i++) { if (_stat[0] == i.ToString()) { result[0].content.Add(stats[i] + " : " + _stat[1]); } } } foreach (string trait in race.statMods) { string[] _trait = trait.Split(":"); string[] traits = Enum.GetNames(typeof(Enums.Traits)); for (int x = 0; x < traits.Length; x++) { if (_trait[0] == x.ToString()) { result[1].content.Add(traits[x] + " : " + _trait[1]); } } } return(result); }
private static void loadRaceDetails() { string chosenRace = races.content[races.currentChoice].ToUpper(); TraitBase race = null; switch (chosenRace) { case "ALDERAN": race = new Alderan(); break; case "BRUTARIS": race = new Brutaris(); break; } if (race != null) { _align.textBox(race.desc, 25, 10, 40); _align.textBox(race.misc, 25, 20, 40); ContentBox[] boxes = loadRaceMods(race); _align.boxContent(boxes[0], 73, 10); _align.boxContent(boxes[1], 100, 10); } }