Commit a49f4e3b by BellCodeEditor

save project

parent 3a3c3d80
Showing with 10 additions and 1 deletions
......@@ -16,7 +16,16 @@ while True:
for event in pygame.event.get():
if event in pygame.event.get():
exit()
if event.type == locals .KEYDOWN:
volume += 0.1
if volume>1 :
volume=1
pygame.mixer.music.get_volume(volume)
if event.type == locals .KEYDOWN:
volume -= 0.1
if volume<1 :
volume=1
pygame.mixer.music.get_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