Commit a9baa1db by BellCodeEditor

save project

parent 573f78e8
Showing with 3 additions and 2 deletions
...@@ -18,8 +18,7 @@ while True: ...@@ -18,8 +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 pygame.mixer.music.get_busy() ==False:
pygame.mixer.music.play()
pygame.mixer.music.set_volume(voice) pygame.mixer.music.set_volume(voice)
if event.type==locals.KEYDOWN: if event.type==locals.KEYDOWN:
if event.key==locals.K_UP: if event.key==locals.K_UP:
...@@ -38,6 +37,8 @@ while True: ...@@ -38,6 +37,8 @@ while True:
else: else:
play_button=play_img play_button=play_img
pygame.mixer.music.pause() pygame.mixer.music.pause()
if pygame.mixer.music.get_busy() ==False:
pygame.mixer.music.play()
# 绘制画面 # 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(logo_img, (170, 60)) # 中间logo图 screen.blit(logo_img, (170, 60)) # 中间logo图
......
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