Esempio n. 1
0
 /// <summary>Apply this buff to an entity, which starts everything in motion. Either `OnStart` or `OnStack` will be called, depending on whether the entity already has an active buff with the same buff ID.</summary>
 public void Apply(Entity entity)
 {
     if (this.entity != null)
     {
         throw new Exception("BuffStuff.Buff: this buff has already been applied to an entity, use a new buff instead of re-applying an existing buff");
     }
     BuffManager.ApplyBuff(entity, this);
 }
Esempio n. 2
0
 /// <summary>Forcibly remove this buff from its entity, without calling `OnExpire` or any other methods. You may want to use the auto-expiry system instead of calling this method.</summary>
 public void Remove()
 {
     BuffManager.RemoveBuff(entity, this);
 }