コード例 #1
0
        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);
        }
コード例 #2
0
 public void SetTarget(IAppliedEffectsComponent target, bool forceSet = false)
 {
     Target = target;
     EffectSystems.ForEach(effectSystem => effectSystem.SetTarget(target, forceSet));
 }