43 lines
1010 B
C#

using UnityEngine;
public class RuntimeEffectInstance : IResettable
{
public Taggable user;
public Taggable target;
public EntityEventBroker sourceBroker;
public EntityEventBroker targetBroker;
public StatusEffect sourceEffect;
public BaseAbility sourceAbility;
public float duration;
public int numberOfStacks;
public float endEffectTime;
public virtual void OnEffectFirstApplied(int numberOfStacksApplied)
{
//do stuff on apply X amount of stacks
}
public virtual void OnEffectRefreshed(int numberOfStacksApplied)
{
//do stuff when refreshed/re-applied
}
public virtual void OnEffectRemoved()
{
//do stuff when expired/removed
}
public void Reset()
{
user = null;
target = null;
sourceBroker = null;
targetBroker = null;
sourceEffect = null;
sourceAbility = null;
duration = 0f;
endEffectTime = 0f;
numberOfStacks = 0;
}
}