Beispiel #1
0
 private void Player_Collide(object sender, CollisionEventArgs e)
 {
     if (e.KillTile)
     {
         if (p.Alive)
         {
             p.Alive = false;
             p.SwitchGraphic("die");
             sfx["explode"].Play();
         }
     }
 }
Beispiel #2
0
 private void Escapee_Collide(object sender, CollisionEventArgs e)
 {
     if (e.KillTile)
     {
         Escapee s = ((Escapee)sender);
         if (s.Alive)
         {
             s.Alive = false;
             s.SwitchGraphic("die");
             sfx["explode"].Play();
         }
     }
 }
Beispiel #3
0
 public void InvokeCollision(CollisionEventArgs args)
 {
     if (Collided != null)
         Collided(this, args);
 }