Commit 0a18c99c by BellCodeEditor

save project

parent 6769ed72
Showing with 7 additions and 15 deletions
......@@ -26,16 +26,6 @@ while True:
exit()
# 按键,控制声音大小
if event.type == locals.KEYDOWN:
if event.button ==1:
x,y==event.pos
if x<370 and x>270 and y<450 and y>350:
click+=1
if click%2==0:
play_button=stop_img
pygame.mixer.music.unpause
else:
play_button=play_img
pygame.mixer.music.pause
if event.key == locals.K_UP:
volume += 0.1
if volume > 1:
......@@ -50,11 +40,13 @@ while True:
# 按下鼠标
if event.type == locals.MOUSEBUTTONDOWN:
# 次数增加
click += 1
if click % 2 == 0:
play_button = stop_img
pygame.mixer.music.unpause()
if event.button ==1:
x,y = event.pos
if x<370 and x>270 and y<450 and y>350:
click += 1
if click % 2 == 0:
play_button = stop_img
pygame.mixer.music.unpause()
else:
play_button = play_img
pygame.mixer.music.pause()
......
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