Commit d10f44ac by BellCodeEditor

save project

parent 42fb438e
Showing with 8 additions and 2 deletions
...@@ -11,7 +11,9 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮 ...@@ -11,7 +11,9 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮
last_img = pygame.image.load('last.png') # 上一曲按钮 last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮 next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 中间logo logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load('mb4.mp3')
mb=['mb2.mp3','mb4.mp3','mb3.mp3','mb.mp3']
m=-1
volume=0.2 volume=0.2
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
...@@ -48,7 +50,11 @@ while True: ...@@ -48,7 +50,11 @@ while True:
if pygame.mixer.music.get_busy()==False: if pygame.mixer.music.get_busy()==False:
pygame.mixer.music.play() m+=1
if m>len(mb)-1:
m=0
pygame.mixer.music.load(mb[m])
pygame.mixer.music.play()
# 绘制画面 # 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮 screen.blit(play_button, (270, 330)) # 暂停按钮
......
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