Example #1
0
 public void UseSkill <aSkill>(Skill.SkillDelegate didStart = null, Skill.SkillDelegate didAction = null, Skill.SkillDelegate didEnd = null)
 {
     foreach (var kvPair in skills)
     {
         if (typeof(aSkill) == kvPair.Value.GetType())
         {
             StartCoroutine(kvPair.Value.Execute(didStart, didAction, didEnd));
             return;
         }
     }
 }
Example #2
0
 public void UseSkill(string skillClassName, Skill.SkillDelegate didStart = null, Skill.SkillDelegate didAction = null, Skill.SkillDelegate didEnd = null)
 {
     StartCoroutine(skills[skillClassName].Execute(didStart, didAction, didEnd));
 }