Commit 15415391 by BellCodeEditor

save project

parent 2446cd59
Showing with 13 additions and 0 deletions
......@@ -13,10 +13,23 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load('歌曲4.ogg')
volume=0.8
pygame.mixer.music.set_volume(volume)
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
if event.type == locals.KEYDOWN:
if event.key == locals.K_w:
voiume += 0.1
if voiume > 1:
voiume=1
pygame.mixer.music.set_volume(volume)
if event.key == locals.K_s:
voiume -= 0.1
if voiume < 0:
voiume=0
pygame.mixer.music.set_volome(volume)
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