Commit 6f5c8985 by BellCodeEditor

save project

parent e74fd758
Showing with 6 additions and 2 deletions
...@@ -21,11 +21,15 @@ while True: ...@@ -21,11 +21,15 @@ while True:
if event.type==locals.KEYDOWN: if event.type==locals.KEYDOWN:
if event.key==locals.K_UP: if event.key==locals.K_UP:
v=v+0.1 v=v+0.1
pygame.mixer.music.set_volame(v) if v>1:
v=1
pygame.mixer.music.set_volume(v)
if event.type==locals.KEYUP: if event.type==locals.KEYUP:
if event.key==locals.K_DOWN: if event.key==locals.K_DOWN:
v=v-0.1 v=v-0.1
pygame.mixer.music.set_volame(v) if v<0:
v=0
pygame.mixer.music.set_volume(v)
if pygame.mixer.music.get_busy()==False: if pygame.mixer.music.get_busy()==False:
pygame.mixer.music.play() 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