Latest code. Still not working.
This commit is contained in:
@@ -12,9 +12,9 @@ while True:
|
||||
event = pygame.event.wait()
|
||||
# if the event is about a keyboard button that have been pressed...
|
||||
if event.type == pygame.KEYDOWN:
|
||||
soundData["bottle"].play(-1)
|
||||
soundData['bottle'].play(-1)
|
||||
if event.type == pygame.KEYUP:
|
||||
soundData["bottle"].stop()
|
||||
soundData['bottle'].stop()
|
||||
# and if the button is the "q" letter or the "escape" key...
|
||||
if event.key == pygame.K_ESCAPE:
|
||||
# ... then exit from the while loop
|
||||
|
||||
Reference in New Issue
Block a user