Commit 50123e84 by BellCodeEditor

save project

parent 226fb5a5
Showing with 9 additions and 1 deletions
......@@ -13,7 +13,11 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐
pygame.mixer.music.load('歌曲3.wav') # 载入音乐
pygame.mixer.music.load('歌曲3.wav') # 载入音乐
if event.type==locals.MOUSEBUTTONDOWN:
click+=1
if click % 2==0:
pygame.mixer.music.unpause()
while True:
......@@ -22,6 +26,10 @@ while True:
exit()
if pygame.mixer.music.get_busy()==False:
pygame.mixer.music.play()
play_button=stop_img
else:
pygame.mixer.music.pause()
play_button=play_img
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
......
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