Commit 6fc1f49a by BellCodeEditor

save project

parent e5efdba5
Showing with 9 additions and 4 deletions
......@@ -25,7 +25,7 @@ pygame.mixer.music.set_volume(volume) # 初始播放音量
click = 0
play_button = stop_img
angle=0
niyuchen=0
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -49,17 +49,20 @@ while True:
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()
play_button = stop_img
niyuchen=0
else:
play_button = play_img
pygame.mixer.music.pause()
play_button = play_img
niyuchen=1
if x > 420 and x < 520 and y > 350 and y < 400: # 下一曲
num += 1
if num > len(music_list) - 1:
num = 0
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
niyuchen=0
play_button = stop_img
if click % 2 == 0:
click += 2
......@@ -72,12 +75,14 @@ while True:
num = len(music_list) - 1
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
niyuchen=0
play_button = stop_img
if click % 2 == 0:
click += 2
else:
click += 1
angle+=1
if niyuchen==0:
angle-=0.909
newlogo=pygame.transform.rotate(logo_img,angle)
newrect=newlogo.get_rect(center=(320,200))
pos=(newrect[0],newrect[1])
......
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