Esempio n. 1
0
        public void RemoveSkillRelation(Skill skill)
        {
            if (!RelationChild.Contains(skill))
            {
                return;
            }

            RelationChild.Remove(skill);
            RelationParent.Remove(skill);

            skill.RemoveSkillRelation(this);
        }
Esempio n. 2
0
 /// <summary>
 /// Helper function for adding skill relations.
 /// Adds to both this skill and to <paramref name="relation"/>.
 /// </summary>
 /// <param name="relation">The skill this skill is related to.</param>
 public void AddSkillRelation(Skill relation)
 {
     // if already in list, don't add it again.
     if (RelationChild.Contains(relation))
     {
         return;
     }
     // add to this skill
     RelationChild.Add(relation);
     RelationParent.Add(relation);
     // add to the other skill, if it already exists in relation it
     // will not be added again.
     relation.AddSkillRelation(this);
 }