def update(self): keys = get_pressed() if keys[K_LEFT]: self.rotation_speed -= self.rotate_increment if keys[K_RIGHT]: self.rotation_speed += self.rotate_increment if keys[K_UP]: self.velocity += self.acceleration if keys[K_z]: self.fire() Entity.update(self)
def update(self): Entity.update(self) self.lifetime -= 1 if self.lifetime <= 0: self.kill()