os version =windows xp
hi guys i'm having problems using pygame the following code just does not seem to work.
hi guys i'm having problems using pygame the following code just does not seem to work.
Code:
clock=pygame.time.Clock()
while True:
sound1.play()
clock.tick(60)
pKeys = pygame.key.get_pressed()
Eves=pygame.event.get()
villian.face()
villian.hert()
if Eves[KEYDOWN] and pKeys[K_UP]:
hero.moveup()
if Eves[KEYUP] and pKeys[K_UP]:
hero.gravity()
if Eves[KEYDOWN] and pKeys[K_DOWN]:
hero.movedown()
if Eves[KEYDOWN] and pKeys[K_RIGHT]:
hero.forward()
if Eves[KEYDOWN] and pKeys[K_LEFT]:
hero.back()
if Eves[KEYDOWN] and pKeys[97]:
sound.play()
hero.reShape()
if Eves[KEYUP] and pKeys[97]:
hero.Shape()
if Eves[KEYDOWN] and pKeys[115]:
hero.Kick()
if Eves[QUIT]:
pygame.quit()
raise SystemExit()
allsprites.update()
screen.blit(background,(0,0))
allsprites.draw(screen)
pygame.display.flip()
time.sleep(1/30)
Comment