Commit 13f0ff15 by BellCodeEditor

auto save

parent 01f030d9
Showing with 9 additions and 2 deletions
...@@ -27,16 +27,23 @@ while True: ...@@ -27,16 +27,23 @@ while True:
exit() exit()
# 按键,控制声音大小 # 按键,控制声音大小
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if event.key == locals.K_UP: if event.key == locals.K_w:
volume += 0.1 volume += 0.1
if volume > 1: if volume > 1:
volume = 1 volume = 1
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
if event.key == locals.K_DOWN: if event.key == locals.K_s:
volume -= 0.1 volume -= 0.1
if volume < 0: if volume < 0:
volume = 0 volume = 0
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
if event.key == locals.K_a:
num-=1
num += 1
if num > len(filelist)-1:
num = 0
pygame.mixer.music.load(filelist[num])
pygame.mixer.music.play()
# 按下鼠标 # 按下鼠标
if event.type == locals.MOUSEBUTTONDOWN: if event.type == locals.MOUSEBUTTONDOWN:
......
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