Commit 0b5354c2 by BellCodeEditor

save project

parent 37fedf61
Showing with 21 additions and 0 deletions
......@@ -14,10 +14,29 @@ logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load|('歌曲4.wav')
if pygame.mixer.music.get_busy()==false:
pygame.mixer.music.play()
volume=0.0
pygane.mixer.music.set_volume(volnme)
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
if pygame.mixer.music.get_busy()==false:
pygame.mixer.music.play()
if event.type==locals.K_DOWN:
if event.key==locals.K_UP:
volume+=0.1
if volume>1:
volume=1
if event.key==locals.K_UP:
volume-=0.1
if volume<0:
volume=0
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
......@@ -26,4 +45,5 @@ while True:
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面
pygame display.uptade
\ No newline at end of file
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