Exemplo n.º 1
0
 public override void Process(Entity e)
 {
     Expires expires = e.GetComponent<Expires>();
     expires.LifeTime -= EntityWorld.Delta / 10000000.0;
     if (expires.LifeTime <= 0)
     {
         e.Delete();
     }
 }
Exemplo n.º 2
0
 public override void Process(Entity e)
 {
     Effect effect = e.GetComponent<Effect>();
     BattleStats stats = effect.Owner.GetComponent<BattleStats>();
     Acting acting = effect.Owner.GetComponent<Acting>();
     if (stats != null && acting != null)
     {
         if (acting.State == ActingState.Cooldown)
         {
             effect.RemainingDuration -= stats.Speed * EntityWorld.Delta / 10000000;
         }
         if (stats.IsDead || effect.RemainingDuration < 0)
         {
             e.Delete();
         }
     }
 }