public AbilitySystem(Ability ability, IAbilitiyComponent owner) { Ability = ability; cooldownDelay = new WaitForSeconds(Ability.Cooldown); Ability.Effects.ForEach(effect => { effect = UnityEngine.Object.Instantiate(effect); EffectSystems.Add(effect.EffectSystem); nextEffectDelays.Add(new WaitForSeconds(effect.NextInterval)); }); SetSystem(owner); }
public void SetTarget(IAppliedEffectsComponent target, bool forceSet = false) { Target = target; EffectSystems.ForEach(effectSystem => effectSystem.SetTarget(target, forceSet)); }