Ejemplo n.º 1
0
 def __init__(self):
     self.game = Game()
     self.map = TiledMap(self.game)
     self.map.set_map(MAZE)
     self.fruechte = self.fruechte_zaehlen(MAZE)
     self.sprite = Sprite(self.game, 'b.pac_right', (1, 1), speed=4)
     self.geist = Sprite(self.game, 'b.ghost_center', (8, 8), speed=4)
     self.game.event_loop(figure_moves=self.move,
                          draw_func=self.draw)        
Ejemplo n.º 2
0
 def __init__(self):
     self.game = Game()
     self.tm = TiledMap(self.game)
     self.gap = Vector(4, 4)
     self.tm.set_map(PUZZLEMAP)
     self.tm.draw()
     self.events = None
     self.game.frame.print_text("Build horizontal rows", (0, 220))
     pygame.display.update()
     self.game.event_loop(figure_moves=self.move)
Ejemplo n.º 3
0
    def __init__(self):
        self.game = Game()

        self.map = TiledMap(self.game)
        self.map.fill_map('#', (10, 10))
        self.map.set_map(MAZE)
        self.map.set_tile((4,4), 'a')
        self.game.frame.print_text("Hello World", (32, 330))
        self.sprite = Sprite(self.game, 'b.pac_right', (1, 1), speed=4)
        self.game.event_loop(figure_moves=self.move, draw_func=self.draw)
Ejemplo n.º 4
0
    def __init__(self):
        config.FRAME = Rect(250, 10, 640, 512)
        self.game = Game()
        self.level_counter = LEVEL_COUNTER_INIT
        play_effect('frutris')
        self.frutris_box = FrutrisBox(self.game, LEVEL)
        # frame = Frame(self.screen, Rect(660, 220, 200, 200))
        self.data = {
            'score': 0,
            'level': 1,
        }
        self.status_box = self.create_status_box()

        # Music
        self.music_counter = 50  # periodically check for expiring track
        self.current_music = ('a', 1)
        self.music = MusicPlayer()
        self.music.play_music('/home/krother/projects/frutris/frutris/music/a1.ogg')
Ejemplo n.º 5
0
 def __init__(self):
     pygame.init()
     self.screen = Screen()
     self.tile_factory = TileFactory()
     self.game = Game()