Commit 3a3ff16c by BellCodeEditor

save project

parent 4b6d7efe
Showing with 16 additions and 7 deletions
tuplel = (100,200)
x,y,z = tuplel
print('x的值是:',x)
print('y的值是:',y)
\ No newline at end of file
import os
a = 'C:\\Users\\XMBC\\Desktop\\a'
b = os.listdir(a)
print(b)
\ No newline at end of file
import pygame
import os
from pygame import locals
pygame.init() # 初始化
......@@ -12,10 +13,18 @@ last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load("a.mp3")
c=["a.mp3","b.mp3"]
c=[]
tick = 0
a = 0.2
b = play_img
d = 'C:\\Users\\XMBC\\Desktop\\a'
f = os.listdir(d)
for i in f:
if i[-4:] == ".mp3":
c.append(i)
num = -1
pygame.mixer.music.set_volume(a)
while True:
......@@ -50,7 +59,7 @@ while True:
num +=1
if num > len(c)-1:
num = 0
pygame.mixer.music.load(c[num])
pygame.mixer.music.load(d + "//" + c[num])
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