Commit 45cb9ecc by BellCodeEditor

save project

parent 1fff2a00
Showing with 3 additions and 3 deletions
......@@ -11,7 +11,7 @@ stop = pygame.image.load('stop.png')
font = pygame.font.Font('neuropol.ttf',20)
pygame.mixer.music.load('test.wav')
fps = pygame.time.Clock()
volume = 0.2
volume = 0.5
pygame.mixer.music.set_volume(volume)
while True:
......@@ -21,11 +21,11 @@ while True:
if event.type == locals.KEYDOWN:
if event.key == locals.K_DOWN:
if volume > 0:
volume -= 0.1
volume -= 0.01
pygame.mixer.music.set_volume(volume)
if event.key == locals.K_UP:
if volume < 1:
volume += 0.1
volume += 0.01
pygame.mixer.music.set_volume(volume)
if pygame.mixer.music.get_busy() == False:
pygame.mixer.music.play()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment