protected virtual List <IEnumerator> ApplyEffects(GameObject caster, GameObject target, SpellEffect[] effects) { List <IEnumerator> effectEnumerators = new List <IEnumerator> (); foreach (SpellEffect effect in effects) { SpellEffect effectCopy = ScriptableObject.Instantiate(effect) as SpellEffect; effectCopy.Initialize(caster, target); effectEnumerators.Add(effectCopy.Trigger()); } return(effectEnumerators); }