예제 #1
0
 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)
예제 #2
0
 def kill(self):
     self.lasers.empty()
     Entity.kill(self)