Commit 5727f77e by BellCodeEditor

save project

parent c88802de
Showing with 10 additions and 9 deletions
......@@ -21,15 +21,6 @@ while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
if event.type == locals.KEYDOWN:
if event.key == locals.K_DOWN:
if volume > 0:
volume -= 0.01
pygame.mixer.music.set_volume(volume)
if event.key == locals.K_UP:
if volume < 1:
volume += 0.01
pygame.mixer.music.set_volume(volume)
if event.type == locals.MOUSEBUTTONDOWN:
if click == 0:
click = 1
......@@ -39,6 +30,16 @@ while True:
click = 0
pygame.mixer.music.unpause()
play_botton = stop
if event.type == locals.KEYDOWN:
if event.key == locals.K_DOWN:
if volume > 0:
volume -= 0.01
pygame.mixer.music.set_volume(volume)
if event.key == locals.K_UP:
if volume < 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