Ejemplo n.º 1
0
 public void OnRemoved(StatusEffectHandler handler)
 {
     foreach (Effect effect in m_effects)
     {
         effect.OnRemoved(handler.gameObject);
     }
 }
Ejemplo n.º 2
0
        public void OnApplied(StatusEffectHandler handler)
        {
            m_endTime = Time.time + m_duration;

            foreach (Effect effect in m_effects)
            {
                effect.OnApplied(handler.gameObject);
            }
        }
Ejemplo n.º 3
0
        public void OnTick(StatusEffectHandler handler)
        {
            foreach (Effect effect in m_effects)
            {
                effect.OnTick(handler.gameObject);
            }

            //Remove the effect if the duration is over
            if (m_endTime < Time.time)
            {
                handler.Remove(this);
            }
        }