Ejemplo n.º 1
0
 def check_death(self):
     if self.rect.top >= 800:
         self.kill()
         self.hitbox.kill()
     if self.health <= 0:
         EnemyExplosion(self.game, self)
         Powerup(self.game, self.pos)
         self.kill()
         self.hitbox.kill()
Ejemplo n.º 2
0
 def check_death(self):
     if self.rect.top >= HEIGHT:
         self.kill()
         self.hitbox.kill()
     if self.health <= 0:
         EnemyExplosion(self.game, self)
         for i in range(3):
             Coin(self.game, self.pos + PVector(randint(-20, 20), randint(-20, 20)))
         self.kill()
         self.hitbox.kill()
Ejemplo n.º 3
0
 def check_death(self):
     if self.rect.top >= 800:
         self.kill()
         self.hitbox.kill()
     if self.health <= 0:
         EnemyExplosion(self.game, self)
         for _ in range(9):
             Coin(self.game,
                  self.pos + PVector(randint(-40, 40), randint(-25, 25)))
         self.kill()
         self.hitbox.kill()
Ejemplo n.º 4
0
    def check_death(self):
        if self.rect.top >= HEIGHT:
            self.kill()
            self.hitbox.kill()

        if self.health <= 0:
            EnemyExplosion(self.game, self)
            Coin(self.game, self.pos - PVector(10, 10))
            Coin(self.game, self.pos + PVector(10, 10))
            self.kill()
            self.hitbox.kill()
Ejemplo n.º 5
0
 def check_death(self):
     if self.rect.bottom <= 0:
         self.kill()
         self.hitbox.kill()
     if self.health <= 0:
         EnemyExplosion(self.game, self)
         for _ in range(7):
             Coin(self.game,
                  self.pos + PVector(randint(-25, 25), randint(-90, 90)))
         self.kill()
         self.hitbox.kill()
Ejemplo n.º 6
0
 def check_death(self):
     if self.frame >= 2000:
         Emerge2(self.game, self.pos)
         self.kill()
         self.hitbox.kill()
     if self.health <= 0:
         EnemyExplosion(self.game, self)
         for _ in range(9):
             Coin(self.game,
                  self.pos + PVector(randint(-60, 60), randint(-40, 40)))
         self.kill()
         self.hitbox.kill()
Ejemplo n.º 7
0
 def check_death(self):
     if self.rect.top > HEIGHT:
         self.kill()
         self.hitbox.kill()
     elif self.rect.bottom < 0:
         self.kill()
         self.hitbox.kill()
     elif self.rect.left > WIDTH:
         self.kill()
         self.hitbox.kill()
     elif self.rect.right < 0:
         self.kill()
         self.hitbox.kill()
     if self.health <= 0:
         EnemyExplosion(self.game, self)
         Coin(self.game, self.pos, None)
         self.kill()
         self.hitbox.kill()