print e print "Connected!" pygame.init() #game objects #screen = pygame.display.set_mode((800, 600)) screen = pygame.display.set_mode((800, 600), pygame.HWSURFACE) pygame.display.set_caption('MTI880 Handcar!') pygame.mouse.set_visible(False) g = GameControl() #main character mainchar = MainChar() mainchar.no_more_life_event = no_more_life font = media.get_font(20) ui = GameUI(mainchar) cam = Camera(mainchar) levels = Levels() load_level(levels.get_next_level()) clock = pygame.time.Clock() show_intro() main()
draw(tick) if __name__ == '__main__': pygame.init() #game objects #screen = pygame.display.set_mode((800, 600)) screen = pygame.display.set_mode((800, 600), pygame.FULLSCREEN | pygame.HWSURFACE) pygame.display.set_caption('Pitfairy Hunter!') pygame.mouse.set_visible(False) g = GameControl() #main character mainchar = MainChar() mainchar.out_of_fuel_event = out_of_fuel mainchar.no_more_life_event = no_more_life mainchar.all_fairies_caught_event = all_fairies_caught logo = media.load_image('logo2.png') font = media.get_font(20) img = media.load_image('StatusBar.png').convert() rimg = img.get_rect() ui = GameUI(mainchar) cam = Camera(mainchar) depthWidget = DepthInfoWidget(img, font, mainchar) levelWidget = LevelInfoWidget(img, font)