Commit 3dd4ddd9 by BellCodeEditor

save project

parent 24b7aaa5
Showing with 10 additions and 9 deletions
...@@ -38,15 +38,15 @@ while True: ...@@ -38,15 +38,15 @@ while True:
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
# 按下鼠标 # 按下鼠标
if event.type == locals.MOUSEBUTTONDOWN: # if event.type == locals.MOUSEBUTTONDOWN:
# 次数增加 # # 次数增加
click += 1 # click += 1
if click % 2 == 0: # if click % 2 == 0:
play_button = stop_img # play_button = stop_img
pygame.mixer.music.unpause() # pygame.mixer.music.unpause()
else: # else:
play_button = play_img # play_button = play_img
pygame.mixer.music.pause() # pygame.mixer.music.pause()
if event.type == locals.MOUSEBUTTONDOWN: if event.type == locals.MOUSEBUTTONDOWN:
if event.button == 1: if event.button == 1:
...@@ -55,6 +55,7 @@ while True: ...@@ -55,6 +55,7 @@ while True:
click += 1 click += 1
if click % 2 == 0: if click % 2 == 0:
play_button = stop_img play_button = stop_img
pygame.mixer.music.unpause()
else: else:
play_button = play_img play_button = play_img
pygame.mixer.music.pause() pygame.mixer.music.pause()
......
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