Commit 2fa8e2cd by BellCodeEditor

save project

parent d369d728
Showing with 2 additions and 3 deletions
...@@ -18,7 +18,7 @@ while True: ...@@ -18,7 +18,7 @@ while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
exit() exit()
''' if event.type==pygame.KEYDOWN:
if event.key==pygame.K_DOWN: if event.key==pygame.K_DOWN:
volume-=0.2 volume-=0.2
if volume<0: if volume<0:
...@@ -27,8 +27,7 @@ while True: ...@@ -27,8 +27,7 @@ while True:
volume+=0.2 volume+=0.2
if volume>1: if volume>1:
volume=1 volume=1
''' pygame.mixer_music.set_volume(volume)
#pygame.mixer_music.set_volume(volume)
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