You can now turn OP mode off
This commit is contained in:
parent
746a9b3389
commit
6ce5e0a463
1 changed files with 6 additions and 4 deletions
10
game.py
10
game.py
|
@ -86,7 +86,12 @@ 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()
|
player.change_colour((255,96,0))
|
||||||
|
elif player.OP:
|
||||||
|
Sounds["OP"].stop()
|
||||||
|
Sounds["main"].play(loops=-1)
|
||||||
|
player.OP = False
|
||||||
|
player.reset_image()
|
||||||
|
|
||||||
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]:
|
||||||
|
@ -166,9 +171,6 @@ def play(window, options):
|
||||||
sleep(0.75)
|
sleep(0.75)
|
||||||
Sounds["main"].set_volume(1.0)
|
Sounds["main"].set_volume(1.0)
|
||||||
|
|
||||||
if player.OP:
|
|
||||||
player.change_colour((255,96,0)) #override colour change if changed before
|
|
||||||
|
|
||||||
update_score(window, player.score)
|
update_score(window, player.score)
|
||||||
update_level(window, player.level)
|
update_level(window, player.level)
|
||||||
update_lives(window, player.lives)
|
update_lives(window, player.lives)
|
||||||
|
|
Reference in a new issue