SpellEffect.timer C# (CSharp) Method

timer() public method

Timer loop for the effect.
public timer ( ) : IEnumerator
return IEnumerator
    public IEnumerator timer()
    {
        while (Active==true)
        {
            yield return new WaitForSeconds(TickTime);
            if (!Permanent)
            {
                counter--;
            }

            if (counter<=0)
            {
                Active=false;
            }
            else
            {
                if (Active)
                {
                    EffectOverTime ();
                }
            }
        }
        CancelEffect();
    }