Commit 50123e84 by BellCodeEditor

save project

parent 226fb5a5
Showing with 8 additions and 0 deletions
...@@ -14,6 +14,10 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮 ...@@ -14,6 +14,10 @@ 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: while True:
...@@ -22,6 +26,10 @@ while True: ...@@ -22,6 +26,10 @@ 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()
play_button=stop_img
else:
pygame.mixer.music.pause()
play_button=play_img
# 绘制画面 # 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景 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