vendredi 1 mai 2015

Pygame: How to do If Statement Correctly?

I need the Keypress to only work when "background" is a certain image. Should be pretty simple, Thanks!

if event.type == pygame.KEYDOWN:
  if event.key == pygame.K_t:
     if background == ("start.png")
       background = pygame.image.load("blahblah.png")

I would like to know how to correctly write the third line.

Aucun commentaire:

Enregistrer un commentaire