Commit a1a45ca1 by BellCodeEditor

save project

parent 597b9dbe
Showing with 4 additions and 3 deletions
......@@ -17,7 +17,7 @@ yinliang=0.2
pygame.mixer.music.set_volume(yinliang)
mousecs=0
zaoxing=play_img
zaoxing=stop_img
while True:
for event in pygame.event.get():
......@@ -39,11 +39,12 @@ while True:
if event.type==locals.MOUSEBUTTONDOWN:
mousecs+=1
if mousecs%2==0:
zaoxing=stop_img
pygame.mixer.music.unpause()
zaoxing=play_img
else:
zaoxing=play_img
pygame.mixer.music.pause()
zaoxing=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