Exemplo n.º 1
0
        public void SetLevelForSecondarySkillType(Type secondarySkillType, SecondarySkillLevel level)
        {
            SecondarySkill skill = ExistingSecondarySkillOfType(secondarySkillType);

            if (level == SecondarySkillLevel.None)
            {
                if (skill != null)
                {
                    SecondarySkills.Remove(skill);
                }
            }
            else
            {
                if (skill == null)
                {
                    skill           = (SecondarySkill)Activator.CreateInstance(secondarySkillType);
                    skill.HeroStats = this;
                    SecondarySkills.Add(skill);
                }

                skill.SkillLevel = level;
            }
        }
Exemplo n.º 2
0
        public SecondarySkillLevel LevelForSecondarySkillType(Type secondarySkillType)
        {
            SecondarySkill skill = ExistingSecondarySkillOfType(secondarySkillType);

            return((skill != null) ? skill.SkillLevel : SecondarySkillLevel.None);
        }