Ejemplo n.º 1
0
 void AddSkill(string skillToAdd)
 {
     //Adds a skill or compounds it, if it already exists
     if (profile.GetSkill(skillToAdd) == null)
     {
         profile.AddSkill(skillToAdd);
     }
 }
Ejemplo n.º 2
0
    void LoadCharModel()
    {
        //Deletes the current model, removes the associated skills, then adds the new model and the new skills
        List <string> skills = GetSkills(currentChar);

        for (int i = 0; i < skills.Count; i++)
        {
            if (profile.GetSkill(skills[i]) != null)
            {
                profile.RemoveSkill(skills[i]);
            }
        }
        Destroy(currentChar);
        currentChar = Instantiate(holder.charChoices[listPos], transform);
        skills      = GetSkills(currentChar);
        for (int j = 0; j < skills.Count; j++)
        {
            if (profile.GetSkill(skills[j]) == null)
            {
                profile.AddSkill(skills[j]);
            }
        }
        profile.StoreModel(listPos);
    }