- melee attack first iteration (WIP) - priest playable class - priest "holy ball" ability
25 lines
783 B
C#
25 lines
783 B
C#
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<Taggable> 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;
|
|
}
|
|
}
|