Commit 3eaaab37 by BellCodeEditor

save project

parent 48ea960f
Showing with 2 additions and 1 deletions
......@@ -15,6 +15,7 @@ pygame.mixer.music.load("歌曲4.ogg")
m_l=[]
num=-1
path="C:\\Users\\Lenovo、\\Documents\\pygame_lesson04_diy"
flielist=os.listdir(path)
for i in flielist:
if i[-4:]==".wav"or i[-4:]==".ogg":
......@@ -74,7 +75,7 @@ while True:
num+=1
if num>len(flielist)-1:
num=0
pygame.mixer.music.load(path+"m_l[num]")
pygame.mixer.music.load(path+"\\"+m_l[num])
pygame.mixer.music.play()
# 绘制画面
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