Commit ef32299c by BellCodeEditor

save project

parent 6889f7fb
Showing with 11 additions and 14 deletions
......@@ -8,7 +8,7 @@ stop_img = pygame.image.load('stop.png')
last_img = pygame.image.load('last.png')
next_img = pygame.image.load('next.png')
logo_img = pygame.image.load('logo.png')
pygame.mixer_music.load('歌曲1.wav')
pygame.mixer_music.load('歌曲3.wav')
volume=0.2
pygame.mixer.music.set_volume(volume)
click=0
......@@ -18,19 +18,16 @@ while True:
if event.type==locals.QUIT:
exit()
if event.type == locals.KEYDOWN:
if evant.key == locals.K_UP:
volume += 0.2
if volume<0:
volume=0
pygame.mixer.music_volume(volume)
if event.type == locals.MOUSEBUTTONDOWN:
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.button==1:
x,y=event.pos
if x>270 and x<370 and y>350 and y<450:
click+=1
if click%2==0:
play_button=stop_img
pygame.mixer.music.unpause()
else:
play_button=play_img
pygame.mixer.music.pause()
if pygame.mixer_music.get_busy()==False:
pygame.mixer_music.play()
screen.blit(bg_img, (0, 0))
......
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