public string GetRole(double x) { if (roles == null) { roles = new NPCRandomizer.WeightedChoiceSet(Roles); } return(roles.Match(x)); }
public string GetRace() { if (races == null) { races = new NPCRandomizer.WeightedChoiceSet(Races); } var r = random.NextDouble(); return(races.Match(r)); }