예제 #1
0
 /// <summary>
 /// Updates buffs/debuffs on this entity
 /// Should be called every frame
 /// </summary>
 public void UpdateStatusEffects()
 {
     for (int i = 0; i < statusEffects.Count; ++i)
     {
         //Apply the effect
         statusEffectMan.ApplyStatusEffects(statusEffects[i], this.gameObject);
         //Update its time
         statusEffects[i].Update();
         //Check to remove it
         if (!statusEffects[i].Alive)
         {
             statusEffects.RemoveAt(i--);
         }
     }
 }