Commit c5fa32d9 by BellCodeEditor

save project

parent f564aabb
Showing with 14 additions and 7 deletions
......@@ -14,6 +14,13 @@ logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load('歌曲3.wav')
volume = 0.8
pygame.mixer.music.set_volume(volume)
# 音乐
filelist = ['歌曲1.wav', '歌曲2.wav', '歌曲3.wav', '歌曲4.ogg']
num = -1
volume = 0.2
pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0
play_button = stop_img
while True:
......@@ -36,13 +43,13 @@ while True:
x, y = event.pos
if x > 270 and x < 370 and y > 350 and y < 450:
click += 1
if click % 2 == 0:
play_button = stop_img
pygame.mixer.music.unpause()
else:
play_button = play_img
pygame.mixer.music.pause()
click += 1
if click % 2 == 0:
play_button = stop_img
pygame.mixer.music.unpause()
else:
play_button = play_img
pygame.mixer.music.pause()
......
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