Browse Source

stop bug where multiple sounds play

master
Jake Howard 6 years ago
parent
commit
cb82deed7b
  1. 7
      game.py

7
game.py

@ -80,9 +80,10 @@ def play(window, options):
bullet_group.add(temp)
if event.type == pygame.KEYDOWN and event.key == pygame.K_KP_PLUS:
player.OP = True
Sounds["main"].stop()
Sounds["OP"].play(loops=-1)
if not player.options["Sounds"] or not player.OP:
Sounds["main"].stop()
Sounds["OP"].play(loops=-1)
player.OP = True
keys = pygame.key.get_pressed()
if keys[pygame.K_RIGHT] or keys[pygame.K_d]:

Loading…
Cancel
Save