Commit d9fd0545 by BellCodeEditor

save project

parent 7eb721fd
Showing with 13 additions and 1 deletions
......@@ -16,6 +16,11 @@ pygame.mixer.music.load('c:/Users/Administrator/Documents/pygame_lesson04_diy/
#yinyue
volume=0.2
click=0
play_button=stop_img
pygame.mixer.music.set_volume(volume)
while True:
for event in pygame.event.get():
......@@ -34,7 +39,14 @@ while True:
if volume<0:
volume=0
pygame.mixer.music.set_volume(volume)
if event.type==locals.MOUSEBUTTONDOWN:
click+=1
if click%2==0:
play_button=stop_imp
pygame.mixer.music.unpause()
else:
play_button=play_img
pygame.mixer.music.psuse()
if pygame.mixer.music.get_busy()==False:
......
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