def kill(self): if self.tier > 1: # Spawn two new asteroids of a tier lower speed = self.velocity.length() new_tier = self.tier - 1 angle1 = self.angle - self.spread angle2 = self.angle + self.spread asteroid1 = Asteroid(new_tier, speed, angle1, self.position) asteroid2 = Asteroid(new_tier, speed, angle2, self.position) Asteroid.number_destroyed += 1 Entity.kill(self)
def kill(self): self.lasers.empty() Entity.kill(self)