Пример #1
0
    Hero ReturnRandomHero()
    {
        HeroName name       = names[random.Next(0, names.Length)];
        Hero     randomHero = new Hero(types[random.Next(0, types.Length)], name, name.upsetMentalityThreshold, 0, name.recruitedMentality, false, 0);

        return(randomHero);
    }
Пример #2
0
        public void Create(HeroName heroName, HeroPassword heroPassword)
        {
            var test = new List <ValidationResult>();

            Validator.TryValidateObject(heroName, new ValidationContext(heroName), test);
            Validator.TryValidateObject(heroPassword, new ValidationContext(heroPassword), test);
        }
Пример #3
0
 public HeroName GetHeroName()
 {
     if (this.heroName == null)
     {
         this.heroName = GetComponentInChildren <HeroName>();
     }
     return(this.heroName);
 }
Пример #4
0
 public Hero(HeroCharacter _type, HeroName _heroName, int _upsetMentalityThreshold, int _strength, int _mentality, bool _injured, int _eventsInjured)
 {
     type     = _type;
     heroName = _heroName;
     upsetMentalityThreshold = _upsetMentalityThreshold;
     strength      = _strength;
     mentality     = _mentality;
     injured       = _injured;
     eventsInjured = _eventsInjured;
 }