public override void RespondToCollision(CollisionData collisionData) { this.Lives--; // Resete collision remove lives when hitted by bonuses if (collisionData.HitObjectsCollisionGroupStrings.Contains("bonuslives")) { this.Lives += 2; } if (collisionData.HitObjectsCollisionGroupStrings.Contains("bonuspoints")) { this.Lives++; } if (collisionData.HitObjectsCollisionGroupStrings.Contains("boss")) { this.Lives-=2; } if (collisionData.HitObjectsCollisionGroupStrings.Contains("bomb")) { this.Lives--; } if (lives <= 0) { this.IsDestroyed = true; } }
public override void RespondToCollision(CollisionData collisionData) { }
public override void RespondToCollision(CollisionData collisionData) { SoundPlayer player = new SoundPlayer(@"..\..\properties\bomb.wav"); player.Play(); this.IsDestroyed = true; }
public virtual void RespondToCollision(CollisionData collisionData) { }
public override void RespondToCollision(CollisionData collisionData) { this.IsDestroyed = true; }