Commit 048f9bc4 by BellCodeEditor

save project

parent e5076d06
Showing with 11 additions and 0 deletions
......@@ -14,6 +14,8 @@ logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load("歌曲4.ogg")
pygame.mixer.music.play()
vl = 0.5
pygame.mixer.music.set_volume(vl)
while True:
for event in pygame.event.get():
......@@ -21,6 +23,15 @@ while True:
exit()
if pygame.mixer.music.get_busy() == False:
pygame.mixer.music.play()
if event.type == locals.KEYDOWN:
if event.key == locals.K_UP:
vl += 0.02
if vl > 1:
vl = 1
if event.key == locals.K_DOWN:
vl -= 0.02
if vl < 0:
vl = 0
# 绘制画面
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