Update cavern.py

This commit is contained in:
ryanlambie 2020-04-21 10:44:29 +01:00
parent 79312e570b
commit 672be494cc

View File

@ -761,12 +761,18 @@ def draw():
# Display "Game Over" image # Display "Game Over" image
screen.blit("over", (0, 0)) screen.blit("over", (0, 0))
# The mixer allows us to play sounds and music # Set up sound system and start music
pygame.mixer.quit() try:
pygame.mixer.init(44100, -16, 2, 1024) pygame.mixer.quit()
pygame.mixer.init(44100, -16, 2, 1024)
music.play("theme")
music.set_volume(0.3)
except:
# If an error occurs, just ignore it
pass
music.play("theme")
music.set_volume(0.3)
# Set the initial game state # Set the initial game state
state = State.MENU state = State.MENU