Commit 11f8a971 by BellCodeEditor

save project

parent 134de3bf
Showing with 9 additions and 7 deletions
......@@ -11,18 +11,16 @@ 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') # 中间logo
pygame.mixer.music.load('HOYO-MiX - Genshin Impact Main Theme 原神.mp3') #载入音乐
pygame.mixer.music.load('HOYO-MiX - Dream Aria (Genshin Impact Main Theme Var.) 梦之咏叹.mp3')
pygame.mixer.music.load('HOYO-MiX - 神女劈观·唤情 Devastation and Redemption.mp3')
my_font = pygame.font.Font('neuropol.ttf',18)
music_list = ['HOYO-MiX - Genshin Impact Main Theme 原神.mp3','HOYO-MiX - Dream Aria (Genshin Impact Main Theme Var.) 梦之咏叹.mp3','HOYO-MiX - 神女劈观·唤情 Devastation and Redemption.mp3']
num = 0
pygame.mixer.music.load(music_list[num])
pygame.mixer.music.play()
play = stop_img #播放/暂停图标状态初始化
volume = 0 #音量初始化
volume = 1 #音量初始化
click = 0.0 #点击次数初始化
pygame.mixer.music.set_volume(volume) #音量
pygame.mixer.music.play() #播放
music_list = ['HOYO-MiX - Genshin Impact Main Theme 原神.mp3','HOYO-MiX - Dream Aria (Genshin Impact Main Theme Var.) 梦之咏叹.mp3','HOYO-MiX - 神女劈观·唤情 Devastation and Redemption.mp3']
num = -1
while True:
for event in pygame.event.get():
......@@ -53,6 +51,10 @@ while True:
pygame.mixer.music.unpause()
play = stop_img
if pygame.mixer.music.get_busy() == False:
num += 1
if num > len(music_list)-1:
num = 0
pygame.mixer.music.load(music_list[num])
pygame.mixer.music.play()
else:
play = play_img
......
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