Commit f81f7074 by BellCodeEditor

auto save

parent 1754f9f4
Showing with 4 additions and 4 deletions
......@@ -17,8 +17,8 @@ pygame.mixer.music.load('歌曲4.ogg') # 载入音乐
volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0
play_button = stop_img
click = 0 # 记录鼠标点击次数
play_button = stop_img # 表示按钮造型
while True:
for event in pygame.event.get():
......@@ -42,10 +42,10 @@ while True:
# 次数增加
click += 1
if click % 2 == 0:
play_button = stop_img
play_button = stop_img # 暂停按钮
pygame.mixer.music.unpause()
else:
play_button = play_img
play_button = play_img # 播放按钮
pygame.mixer.music.pause()
if pygame.mixer.music.get_busy() == False:
......
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