Commit c90036e3 by BellCodeEditor

save project

parent ffa14456
Showing with 5 additions and 1 deletions
...@@ -21,9 +21,13 @@ while True: ...@@ -21,9 +21,13 @@ 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+=0.1 v+=0.1
if v>1:
v=1
pygame.mixer.music.set_volume(v) pygame.mixer.music.set_volume(v)
if event.key==locals.K_DOWN: if event.key==locals.K_DOWN:
v-=0.1 v-=0.1
if v<-1:
v=-1
pygame.mixer.music.set_volume(v) 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