Exemple #1
0
        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;
            }
        }
Exemple #2
0
 public override void RespondToCollision(CollisionData collisionData)
 {
 }
Exemple #3
0
 public override void RespondToCollision(CollisionData collisionData)
 {
     SoundPlayer player = new SoundPlayer(@"..\..\properties\bomb.wav");
     player.Play();
     this.IsDestroyed = true;
 }
Exemple #4
0
 public virtual void RespondToCollision(CollisionData collisionData)
 {
 }
Exemple #5
0
 public virtual void RespondToCollision(CollisionData collisionData)
 {
 }
Exemple #6
0
 public override void RespondToCollision(CollisionData collisionData)
 {
     this.IsDestroyed = true;
 }