Commit 1fc3fb62 by BellCodeEditor

save project

parent bd8a837f
Showing with 14 additions and 3 deletions
......@@ -12,6 +12,10 @@ 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("歌曲4.ogg")
music_list=["歌曲1.wav","歌曲2.wav","歌曲3.wav","歌曲4.ogg"]
num += 1
if num
pygame.mixer.music.play()
volume = 0.0000001
pygame.mixer.music.set_volume(volume)
......@@ -35,13 +39,20 @@ while True:
volume=0
pygame.mixer.music.set_volume(volume)
if event.type = locals.MOUSEBUTTONDOWN:
click += 1
if event button == 1:
x,y = event.pos
if y>350 and y<450:
click += event
if click % 2==0:
play_button = stop_img
x,y = event.pos
pygame.mixer.music.unpause()
else:
play_button = stop_img
pygame.mixer.music.pause()
pygame.mixer.music.pause ()
# 绘制画面
screen.blit(bg_img, (640, 640)) # 填充背景
......
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