示例#1
0
 def process(self, pipe, return_pipe):
     monitor = KeyMonitor(
         self.audio_interface(),
         pipe,
         return_pipe,
         test=False
     )
     monitor.start()
 def process(self, pipe, return_pipe):
     monitor = KeyMonitor(
             self.audio_interface(), 
             pipe,
             return_pipe,
             test=False
         )
     monitor.start()
示例#3
0
    print("Starting Pumpkin Hero...")
    screen_vars = ScreenVars()
    screen = pygame.display.set_mode((screen_vars.get_width(), screen_vars.get_height()))

    black = (0,0,0)

    witch = Witch(50,0,75,75)
    zombie = Zombie(250,0,75,75)
    monster = Monster(450,0,75,75)
    skeleton = Skeleton(650,0,75,75)

    done = False
    last_time = time.time()*1000.0
    SPEED = 5
    game = Game()
    key_monitor = KeyMonitor()

    #Message pump
    while not done:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                done = True
            elif event.type == pygame.KEYDOWN and event.key == pygame.K_q:
                done = True
            elif event.type == pygame.KEYDOWN and event.key == pygame.K_SPACE and game.started()==False:
                #Reset all the pieces
                witch.kill()
                zombie.kill()
                monster.kill()
                skeleton.kill()