Commit 9f947926 by BellCodeEditor

save project

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