Commit ceb1eb1e by BellCodeEditor

save project

parent 43a5bdaa
Showing with 8 additions and 8 deletions
...@@ -13,22 +13,22 @@ next_img = pygame.image.load('next.png') # 下一曲按钮 ...@@ -13,22 +13,22 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 中间logo logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load('歌曲4.ogg') pygame.mixer.music.load('歌曲4.ogg')
a = 0.5 adwaioduwqoibyoi = 0.5
while True: while True:
pygame.mixer.music.set_volume(a) pygame.mixer.music.set_volume(adwaioduwqoibyoi)
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
exit() exit()
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if event.key == locals.K_UP: if event.key == locals.K_UP:
a += 0.1 adwaioduwqoibyoi += 0.1
if a > 1: if adwaioduwqoibyoi > 1:
a = 1 adwaioduwqoibyoi = 1
if event.key == locals.K_DOWN: if event.key == locals.K_DOWN:
a -= 0.1 adwaioduwqoibyoi -= 0.1
if a < 0: if adwaioduwqoibyoi < 0:
a = 0 adwaioduwqoibyoi = 0
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
pygame.mixer.music.play() pygame.mixer.music.play()
# 绘制画面 # 绘制画面
......
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