using System.Collections; using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(fileName = "OverTimeEffect", menuName = "RiftMayhem/AbilitySystem/Effects/OverTime Effect", order = 1)] public class OverTimeValueEffect : BaseEffect { public float value; public float duration; public float tickRate; public override void ApplyEffect(Taggable user, List targets) { foreach (Taggable target in targets) { Debug.Log($"Applied overtime effect of {GetCorrectValueSign(user, target)} every {tickRate}s over {duration}s to target {target.name}"); } } private float GetCorrectValueSign(Taggable user, Taggable target) { return target.targetTag != user.targetTag ? -value : value; } }