Commit 4b6d7efe by BellCodeEditor

save project

parent ad38ee6b
Showing with 6 additions and 2 deletions
...@@ -12,11 +12,11 @@ last_img = pygame.image.load('last.png') # 上一曲按钮 ...@@ -12,11 +12,11 @@ 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("a.mp3") pygame.mixer.music.load("a.mp3")
c=["a.mp3","b.mp3"]
tick = 0 tick = 0
a = 0.2 a = 0.2
b = play_img b = play_img
num = -1
pygame.mixer.music.set_volume(a) pygame.mixer.music.set_volume(a)
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -47,6 +47,10 @@ while True: ...@@ -47,6 +47,10 @@ while True:
b= stop_img b= stop_img
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
num +=1
if num > len(c)-1:
num = 0
pygame.mixer.music.load(c[num])
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