Commit 179dff4e by BellCodeEditor

save project

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