def init(): health.init() steamboat.init() shark.init() pirateboat.init() cloud.init() mine.init() seagull.init()
def init(): health.init() steamboat.init() shark.init() pirateboat.init() cloud.init() mine.init() seagull.init() for module in [health, steamboat, shark, pirateboat, cloud, mine, seagull, water, game, particles, titanic, powerup]: module.SCREEN_WIDTH = SCREEN_WIDTH module.SCREEN_HEIGHT = SCREEN_HEIGHT
def __init__(self): pygame.sprite.Sprite.__init__(self) if not health.Health.heart: health.init() self.image = health.Health.heart self.hitmask = pygame.surfarray.array_alpha(self.image) self.rect = self.image.get_rect() self.rect.left = SCREEN_WIDTH self.rect.bottom = Water.global_water.get_water_level(SCREEN_WIDTH) self.dx, self.dy = -1, 0 self.t = 0 self.picked = False self.fading = False