Esempio n. 1
0
        /// <summary>
        /// Returns the skill corresponding to the id, or null if it is not found.
        /// </summary>
        [CanBeNull] public Skill getSkill(SkillsID skillId)
        {
            Skill skill;

            skills.TryGetValue(skillId, out skill);
            return(skill);
        }
Esempio n. 2
0
        /// <summary>
        /// Creates then add a skill of the id specified to the manager, then returns it.
        /// </summary>
        public Skill addSkill(SkillsID skillId)
        {
            ISkillModel model;
            bool        hasId = Skill.Models.TryGetValue(skillId, out model);
            //Assert.IsTrue(hasId, "The skill key '" + skillId + "' does not exists");
            //Assert.IsNull(getSkill(skillId), "The skill is already stored by this manager");

            var skill = new Skill(model, this);

            skills.Add(skillId, skill);
            return(skill);
        }
Esempio n. 3
0
 /// <summary>
 /// Removes the skill with the given id.
 /// </summary>
 /// <param name="skillId"></param>
 public void removeSkill(SkillsID skillId)
 {
     skills.Remove(skillId);
 }