Beispiel #1
0
 def __init__(self, pos):
     Collidable.__init__(self)
     self.images = [
         load_image("data/coin-1.png"), load_image("data/coin-2.png"),
         load_image("data/coin-3.png"), load_image("data/coin-4.png"),
     ]
     self.image = self.images[0]
     self.rect = self.image.get_rect(topleft = pos)
     self.frame = 0
     self.always_update = True
     self.z = -2
     self.looted = False
Beispiel #2
0
 def __init__(self, pos, imagepos, slant=0):
     Collidable.__init__(self)
     self.sheet = load_image("data/platform.png")
     self.image = pygame.Surface((16, 16))
     self.image.set_colorkey((0, 0, 0), pygame.RLEACCEL)
     self.image.blit(self.sheet, (-imagepos[0]*16,
         -imagepos[1]*16, 16, 16))
     self.rect = self.image.get_rect(topleft = pos)
     self.slant = slant  #1 for up slope right, -1 for down slope right
     self.z = -3
Beispiel #3
0
    def __init__(self):
        Collidable.__init__(self)
        self.right_images = [
            load_image("data/bubbman-1.png"),
            load_image("data/bubbman-2.png"),
        ]
        self.left_images = []
        for img in self.right_images:
            self.left_images.append(pygame.transform.flip(img, 1, 0))

        self.images = self.right_images
        self.image = self.images[0]
        self.rect = pygame.Rect(0, 144 - 16, 6, 16)

        self.facing = 1
        self.falling = False
        self.jump_speed = 0
        self.frame = 0
        self.jumping = True
        self.offsetx = -5
        self.z = 0
Beispiel #4
0
 def __init__(self):
     self.image = util.load_image("data/bubbman-nes.png")
     self.pos = [32, 112]
     self.jump_speed = 0
Beispiel #5
0
 def __init__(self):
     self.image = util.load_image("assets/mini/player.png")
     self.pos = [32, 112]
     self.jump_speed = 0
Beispiel #6
0
 def __init__(self, pos):
     Collidable.__init__(self)
     self.image = load_image('data/portal.png')
     self.rect = pygame.Rect(pos[0], pos[1], 16, 16)
Beispiel #7
0
 def __init__(self):
     self.image = util.load_image("data/bubbman-nes.png")
     self.pos = [32, 112]
     self.jump_speed = 0