def __init__(self):
     Sprite.__init__(self, Img.mario)
     self.gravity_constant = GRAVITY_CONSTANT
     self.vertical_velocity = VERTICAL_VELOCITY
     self.alive = 1
     self.reloading = 1
     self.rect.centerx = SCREENRECT.centerx
     self.rect.bottom = SCREENRECT.bottom - 10
     self.jumping = 0
    def __init__(self):
        Sprite.__init__(self, Img.tube)
        self.alive = 1
        self.reloading = 0
        self.rect.centerx = SCREENRECT.centerx + 100
        self.rect.bottom = SCREENRECT.bottom - 10

        def update(self, ):
            global SCREENRECT
            self.rect[0] = self.rect[0].clamp(SCREENRECT)
            self.rect.bottom = SCREENRECT.bottom - 30
    def __init__(self):
        Sprite.__init__(self, Img.goomba)
        self.alive = 1
        self.reloading = 0
        self.rect.centerx = SCREENRECT.centerx + 400
        self.rect.bottom = SCREENRECT.bottom - 10
        self.facing = random.choice((-1, 1)) * GOOMBA_SPEED
        if self.facing < 0:

            self.rect.centerx += 5
            self.rect.bottom = SCREENRECT.bottom
        else:
            self.rect.centerx -= 50
            self.rect.bottom = SCREENRECT.bottom
 def __init__(self, mario):
     Sprite.__init__(self, Img.fireball)
     self.rect.centerx = mario.rect.centerx
     self.rect.bottom = mario.rect.centerx - 10
 def __init__(self, sprite):
     Sprite.__init__(self, Img.burn)
     self.life = EXPLODE_TIME
     self.rect.center = sprite.rect.center