Commit 2a51c7e9 by BellCodeEditor

save project

parent db5538b7
Showing with 2 additions and 2 deletions
...@@ -15,7 +15,7 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮 ...@@ -15,7 +15,7 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮
b=[] b=[]
g="C:\\Users\\2020\\Desktop\\f" g="C:\\Users\\2020\\Desktop\\f"
h=os.listdir(g) h=os.listdir(g)
for in h: for i in h:
if i[-4:]==".wav" or i[-4:]==".ogg" : if i[-4:]==".wav" or i[-4:]==".ogg" :
b.append(i) b.append(i)
volume = 0.2 volume = 0.2
...@@ -58,7 +58,7 @@ while True: ...@@ -58,7 +58,7 @@ while True:
d+=1 d+=1
if d>len(b)-1: if d>len(b)-1:
d=0 d=0
pygame.mixer.music.load(b[d]) pygame.mixer.music.load(g+"\\"+b[d])
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