public CharacterData getCharByGender(Gender gender) { CharactersInfo list = mainChars; List <CharacterData> findings = list.chars.FindAll(x => (x.gender == gender)); return(Utils.getRandomElement(findings)); }
public CharacterData getCharByGenderColor(Gender gender, CharColor color) { CharactersInfo list = mainChars; CharacterData data = list.chars.Find(x => (x.gender == gender && x.color == color)); return(data); }
public CharacterData getCharByColor(CharColor color) { CharactersInfo list = mainChars; List <CharacterData> findings = list.chars.FindAll(x => (x.color == color)); return(Utils.getRandomElement(findings)); }
public void add() { CharactersInfo item = new CharactersInfo(lists.Count); lists.Add(item); }
// Methods public void add(CharactersInfo item) { lists.Add(item); }