当我按下一个按钮时,将同时按下两个按钮。我使图像的行为就像一个按钮,但是现在当我按下一个按钮时,两个按钮都被按下了。]
while True:
for event in pygame.event.get():
if event.type == pygame.KEYUP:
BEEP2.play()
screen.blit(g,(150,0))
pygame.display.update()
time.sleep(.30)
screen.blit(mg,(150,0))
pygame.display.update()
time.sleep(2)
if event.type == pygame.KEYDOWN:
BEEP1.play()
screen.blit(iimg,(0,0))
pygame.display.update()
time.sleep(.30)
screen.blit(img,(0,0))
pygame.display.update()