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)); }
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)); }
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); } }
public void invoke(DeadEvent eventArgs) { this.removeBodies(this.BodyList); }
public void invoke(DeadEvent eventArgs) { this.isPhysicsEnabled = false; }