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; } } }
public void UseSkill(string skillClassName, Skill.SkillDelegate didStart = null, Skill.SkillDelegate didAction = null, Skill.SkillDelegate didEnd = null) { StartCoroutine(skills[skillClassName].Execute(didStart, didAction, didEnd)); }