Commit e05dcc80 by BellCodeEditor

save project

parent 7de95a52
Showing with 3 additions and 7 deletions
......@@ -11,11 +11,11 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮
last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
list=["frog.mp3","歌曲1.wav"]
i=0
# 载入音乐
pygame.mixer.music.load('frog.mp3') # 载入音乐
volume = 0.5
volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0
play_button = stop_img
......@@ -52,11 +52,7 @@ while True:
pygame.mixer.music.pause()
if pygame.mixer.music.get_busy() == False:
if i>len(list)-1:
i=0
pygame.mixer.music.load(list[i]) # 载入音乐
pygame.mixer.music.play()
i+=1
# 绘制画面
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