Пример #1
0
 public AnimalStats()
 {
     HouseType         = (HouseType)Random.Range(0, System.Enum.GetValues(typeof(HouseType)).Length);
     HasGarden         = Random.Range(0, 2) == 0;
     HasChildren       = Random.Range(0, 2) == 0;
     HasOtherAnimals   = Random.Range(0, 2) == 0;
     Cost              = Random.Range(300, 2000);
     AnimalPersonality = (AnimalPersonality)Random.Range(0, System.Enum.GetValues(typeof(AnimalPersonality)).Length);
 }
Пример #2
0
 public ClientStats()
 {
     HouseType               = (HouseType)Random.Range(0, System.Enum.GetValues(typeof(HouseType)).Length);
     HasGarden               = Random.Range(0, 2) == 0;
     HasChildren             = Random.Range(0, 2) == 0;
     HasOtherAnimals         = Random.Range(0, 2) == 0;
     Income                  = Random.Range(300, 2000);
     ClientPersonality       = (ClientPersonality)Random.Range(0, System.Enum.GetValues(typeof(ClientPersonality)).Length);
     AnimalPersonalityWanted = (AnimalPersonality)Random.Range(0, System.Enum.GetValues(typeof(AnimalPersonality)).Length);
 }
Пример #3
0
 public ClientStats(HouseType houseType, bool hasGarden, bool hasChildren,
                    bool hasOtherAnimals, int income, AnimalPersonality animalPersonalityWanted)
 {
     HouseType               = houseType;
     HasGarden               = hasGarden;
     HasChildren             = hasChildren;
     HasOtherAnimals         = hasOtherAnimals;
     Income                  = income;
     ClientPersonality       = (ClientPersonality)Random.Range(0, System.Enum.GetValues(typeof(ClientPersonality)).Length - 1);
     AnimalPersonalityWanted = animalPersonalityWanted;
 }
    public string GetRandomAnswerAnimalPersonality(bool vague, AnimalPersonality answerType)
    {
        List <string> answersList;

        if (vague)
        {
            answersList = answers.animalAnswers.animalPersonalityAnswersVague.Find(item => item.personalityAnswer == answerType).answers;
        }
        else
        {
            answersList = answers.animalAnswers.animalPersonalityAnswers.Find(item => item.personalityAnswer == answerType).answers;
        }
        return(answersList.ElementAt(Random.Range(0, answersList.Count)));
    }