Exemplo n.º 1
0
 def __init__(self, left=600, top=200):
     pygame.sprite.Sprite.__init__(self)  # call Sprite intializer
     self.image, self.rect = load_image("wall.png", None)
     screen = pygame.display.get_surface()
     self.area = screen.get_rect()
     self.rect.topleft = left, top
     self.moving = True
     self.move = -1 * cfg.scrollspeed
Exemplo n.º 2
0
 def __init__(self):
     pygame.sprite.Sprite.__init__(self)
     self.image, self.rect = load_image("Hellioclopater.gif", -1)
     self.image = pygame.transform.scale(self.image, cfg.helicopter_size)
     self.rect.size = subtract_one_from_tuple(cfg.helicopter_size)
     screen = pygame.display.get_surface()
     self.area = screen.get_rect()
     self.rect.centery = self.area.height / 2
     self.rect.left = cfg.helicopter_initial_left
     self.acceleration = cfg.GRAVITY_ACCELERATION
     self.velocity = 0.0
Exemplo n.º 3
0
 def __init__(self, left, top):
     Wall.__init__(self, left, top)
     self.image, self.rect = load_image('wall.png', None)
     self.image = pygame.transform.scale(self.image, cfg.obstacle_size )
     self.rect.size = cfg.obstacle_size
     self.rect.topleft = left, top