envi.update() envi.draw(gamesurf) pygame.transform.scale(gamesurf, (backbuf.get_width(), backbuf.get_height()), backbuf) window.blit(backbuf, (0, 0)) pygame.display.update() if stopper < 1: for ev in pygame.event.get(): if ev.type == QUIT: pygame.mixer.music.stop() pygame.quit() sys.exit() elif ev.type == KEYDOWN: if ev.key == K_LEFT: char.set_left() char.set_go_left(True) char.set_on_wall(False) #Allow logic to figure out whether or not a wall is hit #char.set_on_floor(False) elif ev.key == K_RIGHT: char.set_right() char.set_go_right(True) char.set_on_wall(False) #Allow logic to figure out whether or not a wall is hit #char.set_on_floor(False) elif ev.key in (K_UP, K_DOWN, K_SPACE) and char.on_floor: char.flip() #char.set_on_wall(False) char.set_on_floor(False) #Allow logic to figure out whether or not a floor is hit #elif ev.key==K_f: # char.set_on_floor(not char.on_floor) #elif ev.key==K_w: # char.set_on_wall(not char.hitwall)