Commit c1753fec by BellCodeEditor

save project

parent e22d6bc0
Showing with 6 additions and 1 deletions
...@@ -12,7 +12,8 @@ last_img = pygame.image.load('last.png') # 上一曲按钮 ...@@ -12,7 +12,8 @@ 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('歌曲4.ogg') n=-1
f=['歌曲1.wav','歌曲2.wav','歌曲3.wav','歌曲4.ogg']
v = 0.8 v = 0.8
pygame.mixer.music.set_volume(v) pygame.mixer.music.set_volume(v)
c = 0 c = 0
...@@ -48,6 +49,10 @@ while True: ...@@ -48,6 +49,10 @@ while True:
pygame.mixer.music.pause() pygame.mixer.music.pause()
if pygame.mixer.music.get_busy()==False: if pygame.mixer.music.get_busy()==False:
n+=1
if n>len(f)-1:
n=0
pygame.mixer.music.load(f[n])
pygame.mixer.music.play() pygame.mixer.music.play()
# 绘制画面 # 绘制画面
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