Commit 9f947926 by BellCodeEditor

save project

parent fc7ffaed
Showing with 11 additions and 8 deletions
......@@ -15,7 +15,7 @@ pygame.mixer.music.load("歌曲3.wav")
#pygame.mixer.music.play()
volume=0.2
pygame.mixer.music.set_volume(volume)
x=1
xx=1
button=stop_img
while True:
for event in pygame.event.get():
......@@ -33,13 +33,16 @@ while True:
volume=0
pygame.mixer.music.set_volume(volume)
if event.type==locals.MOUSEBUTTONDOWN:
x+=1
if x%2==0:
pygame.mixer.music.unpause()
button=play_img
else :
pygame.mixer.music.pause()
button=stop_img
if event.button==1:
x,y=event.pos
if x>270 and x<370 and y>330 and y<430:
xx+=1
if xx%2==0:
pygame.mixer.music.unpause()
button=play_img
else :
pygame.mixer.music.pause()
button=stop_img
if pygame.mixer.music.get_busy()==False:
pygame.mixer.music.play()
......
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