mardi 28 mai 2019

How check, if button pressed twice?

I am able to press the Enter button in Python, using Pygame. Now, it prints "once" into the console everytime I press the button. How can i detect if the button is pressed more than once and print "more than once"?

  if event.key == pygame.K_RETURN:

      print("once")

Aucun commentaire:

Enregistrer un commentaire