public void Tick(EffectController target) { if ((Time.time - lastTick) >= TickFrequency) { if (targetHealth != null) { targetHealth.TakeDamage(damage); } lastTick = Time.time; } }
public void EffectApplied(EffectController target) { timeStarted = GameTime.time; targetHealth = target.GetComponent <UnitHealth>(); }