stop OP music when you press the button again
This commit is contained in:
parent
7ae0ca4d3f
commit
51f8d3e4eb
1 changed files with 1 additions and 0 deletions
1
game.py
1
game.py
|
@ -86,6 +86,7 @@ def play(window, options):
|
||||||
Sounds["main"].stop()
|
Sounds["main"].stop()
|
||||||
Sounds["OP"].play(loops=-1)
|
Sounds["OP"].play(loops=-1)
|
||||||
player.OP = True
|
player.OP = True
|
||||||
|
else: Sounds["OP"].stop()
|
||||||
|
|
||||||
keys = pygame.key.get_pressed()
|
keys = pygame.key.get_pressed()
|
||||||
if keys[pygame.K_RIGHT] or keys[pygame.K_d]:
|
if keys[pygame.K_RIGHT] or keys[pygame.K_d]:
|
||||||
|
|
Reference in a new issue