Commit 0142cd32 by BellCodeEditor

auto save

parent 02b162f4
Showing with 7 additions and 2 deletions
......@@ -14,6 +14,9 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐
pygame.mixer.music.load('歌曲4.ogg') # 载入音乐
pygame.mixer.music.load('歌曲1.wav')
pygame.mixer.music.load('歌曲2.wav')
pygame.mixer.music.load('歌曲3.wav')
volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
......@@ -21,6 +24,8 @@ click = 0
play_button = stop_img
x = 0
y = 0
nom = -1
mon = ["歌曲1.wav","歌曲2.wav","歌曲3.wav","歌曲4.ogg"]
while True:
for event in pygame.event.get():
......@@ -53,8 +58,8 @@ while True:
pygame.mixer.music.pause()
if pygame.mixer.music.get_busy() == False:
pygame.mixer.music.play()
nom += 1
if nom > len(mon)
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮
......
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