Commit f10f17b7 by BellCodeEditor

save project

parent 89f12ec0
Showing with 9 additions and 0 deletions
...@@ -19,6 +19,15 @@ while True: ...@@ -19,6 +19,15 @@ while True:
exit() exit()
if pygame.mixer.music.get_busy == False: if pygame.mixer.music.get_busy == False:
pygame.mixer.music.play() pygame.mixer.music.play()
if event.type == locals.KEYDOWN:
if event.key == K_UP:
volume += 0.1
if volume > 1:
volume = 1
if event.key == K_DOWN:
volume -= 0.1
if volume < 0:
volume = 0
# 绘制画面 # 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(stop_img, (270, 330)) # 暂停按钮 screen.blit(stop_img, (270, 330)) # 暂停按钮
......
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