Commit f114335c by BellCodeEditor

save project

parent 1754f9f4
Showing with 24 additions and 2 deletions
我把ak放下拿起加特林
端起扫射扫穿了他的筋
三押战神我只有十三岁
没有义气的他嘴依然碎
拿起mic以为自己马思唯
这种flow我见过在垃圾堆
年轻又有力我才初中生
懂得客观不像你不忠诚
想成为rap star王以钛
你不付出努力只光期待
我在听着kanye你们却在拜韩国
你们格局小了才会觉得他在传说
\ No newline at end of file
...@@ -14,6 +14,7 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮 ...@@ -14,6 +14,7 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮
# 载入音乐 # 载入音乐
pygame.mixer.music.load('歌曲4.ogg') # 载入音乐 pygame.mixer.music.load('歌曲4.ogg') # 载入音乐
num = -1
volume = 0.2 volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量 pygame.mixer.music.set_volume(volume) # 初始播放音量
...@@ -39,8 +40,10 @@ while True: ...@@ -39,8 +40,10 @@ while True:
# 按下鼠标 # 按下鼠标
if event.type == locals.MOUSEBUTTONDOWN: if event.type == locals.MOUSEBUTTONDOWN:
# 次数增加 if event.button==1:
click += 1 x,y=event.pos
if x > 270 and x< 350 and y > 350 and y < 450:
click+=1
if click % 2 == 0: if click % 2 == 0:
play_button = stop_img play_button = stop_img
pygame.mixer.music.unpause() pygame.mixer.music.unpause()
...@@ -49,8 +52,14 @@ while True: ...@@ -49,8 +52,14 @@ while True:
pygame.mixer.music.pause() pygame.mixer.music.pause()
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
num += 1
if num > len(filelist)-1:
num = 0
pygame.mixer.music.load(filelist[num])
pygame.mixer.music.play() pygame.mixer.music.play()
# 绘制画面 # 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮 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