Пример #1
0
        public CharacterData getCharByGender(Gender gender)
        {
            CharactersInfo       list     = mainChars;
            List <CharacterData> findings = list.chars.FindAll(x => (x.gender == gender));

            return(Utils.getRandomElement(findings));
        }
Пример #2
0
        public CharacterData getCharByGenderColor(Gender gender, CharColor color)
        {
            CharactersInfo list = mainChars;
            CharacterData  data = list.chars.Find(x => (x.gender == gender && x.color == color));

            return(data);
        }
Пример #3
0
        public CharacterData getCharByColor(CharColor color)
        {
            CharactersInfo       list     = mainChars;
            List <CharacterData> findings = list.chars.FindAll(x => (x.color == color));

            return(Utils.getRandomElement(findings));
        }
Пример #4
0
        public void add()
        {
            CharactersInfo item = new CharactersInfo(lists.Count);

            lists.Add(item);
        }
Пример #5
0
 // Methods
 public void add(CharactersInfo item)
 {
     lists.Add(item);
 }