Commit 76bf65e0 by BellCodeEditor

save project

parent 32265479
Showing with 5 additions and 2 deletions
...@@ -15,6 +15,7 @@ pygame.mixer.music.load('歌曲4.ogg') ...@@ -15,6 +15,7 @@ pygame.mixer.music.load('歌曲4.ogg')
SB=0.2 SB=0.2
pygame.mixer.music.set_volume(SB) pygame.mixer.music.set_volume(SB)
d=0 d=0
c=stop_img
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -38,13 +39,15 @@ while True: ...@@ -38,13 +39,15 @@ while True:
d+=1 d+=1
if d%2==0: if d%2==0:
pygame.mixer.music.pause() pygame.mixer.music.pause()
c=play_img
else: else:
pygame.mixer.music.unpause() pygame.mixer.music.unpause()
c=stop_img
if pygame.mixer.music.get_busy()==False: if pygame.mixer.music.get_busy()==False:
pygame.mixer.music.play() pygame.mixer.music.play()
# 绘制画面 # 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_img, (270, 330)) # 暂停按钮 screen.blit(c, (270, 330)) # 暂停按钮
screen.blit(logo_img, (170, 60)) # 中间logo图 screen.blit(logo_img, (170, 60)) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲 screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲 screen.blit(next_img, (420, 350)) # 下一曲
......
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