Commit 890da8f3 by BellCodeEditor

auto save

parent a11d6bb6
......@@ -13,8 +13,10 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐
pygame.mixer.music.load('歌曲1.wav') # 载入音乐
ml = ['歌曲1.wav','歌曲2.wav','歌曲3.wav','歌曲4.ogg']
pygame.mixer.music.load('歌曲1.wav') # 载入音乐
mum=-1
volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0
......@@ -37,7 +39,7 @@ while True:
volume = 0
pygame.mixer.music.set_volume(volume)
# 按下鼠标
# 按下鼠标?
if event.type == locals.MOUSEBUTTONDOWN:
if event.button == 1:
x,y = event.pos
......@@ -52,6 +54,10 @@ while True:
pygame.mixer.music.pause()
if pygame.mixer.music.get_busy() == False:
mum+=1
if mum>len(ml)-1:
mum=0
pygame.mixer.music.load(ml[mum])
pygame.mixer.music.play()
# 绘制画面
......@@ -62,3 +68,4 @@ while True:
screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面
pygame.display.update()
File added
File added
File added
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