Exemplo n.º 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="_lifetime">How long the status should be applied, in seconds</param>
 /// <param name="_buff">Name of the buff to apply</param>
 /// <param name="_debuff">Name of the debuff to apply</param>
 /// <param name="_effect">Name of the auxiliary effect to apply</param>
 public StatusEffect(float _lifetime, StatusEffectManager.Buffs _buff, StatusEffectManager.Debuffs _debuff, StatusEffectManager.StatusEffects _effect)
 {
     lifetime = _lifetime;
     buff     = _buff;
     debuff   = _debuff;
     effect   = _effect;
     alive    = true;
 }
Exemplo n.º 2
0
 /// <summary>
 /// These three methods remove a specific status effect
 /// </summary>
 /// <param name="buffName">Name of the buff</param>
 public void RemoveStatusEffect(StatusEffectManager.Buffs buffName)
 {
     for (int i = 0; i < statusEffects.Count; ++i)
     {
         if (statusEffects[i].Buff == buffName)
         {
             statusEffects.RemoveAt(i);
         }
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// These three methods return a status effect of the specific type
 /// </summary>
 /// <param name="buffName">Name of the buff</param>
 /// <returns>The status effect object</returns>
 public StatusEffect GetStatusEffect(StatusEffectManager.Buffs buffName)
 {
     for (int i = 0; i < statusEffects.Count; ++i)
     {
         if (statusEffects[i].Buff == buffName)
         {
             return(statusEffects[i]);
         }
     }
     return(null);
 }
Exemplo n.º 4
0
 /// <summary>
 /// These three methods return true if this entity contains the specified status effect
 /// </summary>
 /// <param name="buffName">Name of the buff</param>
 /// <returns>True if contains</returns>
 public bool ContainsStatusEffect(StatusEffectManager.Buffs buffName)
 {
     for (int i = 0; i < statusEffects.Count; ++i)
     {
         if (statusEffects[i].Buff == buffName)
         {
             return(true);
         }
     }
     return(false);
 }