Commit 21d72f4e by BellCodeEditor

save project

parent b91eec02
Showing with 5 additions and 6 deletions
...@@ -28,13 +28,12 @@ if event.type==locals.KEYDOWN: ...@@ -28,13 +28,12 @@ if event.type==locals.KEYDOWN:
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
if event.key==locals.K_s: if event.key==locals.K_s:
if x>270 and x < 370andy>350and y <450:
volume-=0.1 volume-=0.1
if volume<0: if clck+=1
volume=0 if click%2==0:
pygame.mixer.music.set_volume(volume) pygame.mixer.music.pause()
if pygame.mixer.music.get_busy()==False if pygame.mixer.ifmusic.get_busy()==False
pygame.mixer.music.play() pygame.mixer.music.play()
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(stop_img, (270, 330)) # 暂停按钮 screen.blit(stop_img, (270, 330)) # 暂停按钮
......
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