Commit a44e062a by BellCodeEditor

auto save

parent 25b7cbea
Showing with 3 additions and 2 deletions
...@@ -16,6 +16,7 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮 ...@@ -16,6 +16,7 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮
pygame.mixer.music.load('歌曲1.wav') # 载入音乐 pygame.mixer.music.load('歌曲1.wav') # 载入音乐
music_list = ['歌曲1.wav'] music_list = ['歌曲1.wav']
num = -1 num = -1
volume = 0.2 volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量 pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0 click = 0
...@@ -54,8 +55,8 @@ while True: ...@@ -54,8 +55,8 @@ while True:
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
num += 1 num += 1
if num > len(music_list) if num > len(music_list)-1
num = 0 num =0
pygame.mixer.music.load(music_list[num]) pygame.mixer.music.load(music_list[num])
pygame.mixer.music.play() 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