Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def isBombed(self, data):
"""Called when a superbomb hits the bomber"""
self.kill()
self.smoke.kill()
Explosion(data, self.rect.center, 60)
data.shakeScreen(20)
sound.play('shoot down')
pygame.time.wait(50)
data.score += data.scoreValues['destroy bomber']
def explode(self, data, shake=True):
"""Explode the bomb, if shake=True shake the screen a little"""
self.kill()
self.smoke.kill()
Explosion(data, self.rect.center, 40)
if shake:
data.shakeScreen(10)