Exemple #1
0
 public void invoke(DeadEvent eventArgs)
 {
     owner.changeState(EntityState.Dead, true, false);
     //Se cambia la propiedad para que se haga la animación
     owner.changeIntProperty(EntityProperty.Action, ActionsList.Dead, false);
     EventManager.Instance.fireEvent(DeadActionEvent.Create(owner, false, this));
 }
Exemple #2
0
 public void invoke(DeadEvent eventArgs)
 {
     this.fade(FADE_TYPE.IN);
     this.enabled = true;
     Program.GAME.ComponentManager.addUpdateableOnly(this);
     EventManager.Instance.fireEvent(DeadActionEvent.Create(this.entityToApply, false, this));
 }
Exemple #3
0
 public void invoke(DeadEvent eventArgs)
 {
     if (!this.Enabled)
     {
         // Se activa y se registra el componente una vez
         // la entidad "muere"
         this.Enabled = true;
         this.deadActionObjects = new List<object>();
         Program.GAME.ComponentManager.addComponent(this);
         // Se registra a DEAD_ACTION_EVENT para saber cuando otros objetos
         // empiecen y terminen acciones de muerte
         EventManager.Instance.addListener(EventType.DEAD_ACTION_EVENT, this.owner, this);
     }
 }
Exemple #4
0
 public void invoke(DeadEvent eventArgs)
 {
     this.removeBodies(this.BodyList);
 }
Exemple #5
0
 public void invoke(DeadEvent eventArgs)
 {
     this.isPhysicsEnabled = false;
 }