Пример #1
0
 def __init__(self, image_file, grav, grav_acc, jump, frames = 1):
     Sprite.__init__(self, image_file, frames)
     self.grav = grav
     self.grav_acc = grav_acc
     self.jump = jump
     self.groundCol = False
     self.speed = 0
Пример #2
0
 def __init__(self, amount=1, x=0, y=0, z=1):
     self.z = z
     if amount == 1:
         Sprite.__init__(self, 'assets/hud/floor_heart_1.png')
     if amount == 2:
         Sprite.__init__(self, 'assets/hud/floor_heart_2.png')
     if amount >= 3:
         Sprite.__init__(self, 'assets/hud/floor_heart_3.png')
     self.x = x
     self.y = y
     self.amount = amount