Commit 6a08c8ac by BellCodeEditor

save project

parent 0cb0539d
Showing with 2 additions and 2 deletions
......@@ -21,13 +21,13 @@ while True:
if event.type == locals.QUIT:
exit()
if event.type == locals.KEYDOWN:#判断按键是否按下
if event.key== locals.KEYDOWN:#判断按键是否按下
if event.type == locals.K_UP:#判断是否按下上键
a+=0.1#音量增加
if a > 1:#判断音量是否大于一
a=1#音量设为1
pygame.mixer.music.set_volume(a)#设置音量大小
if event.type == locals.K_DOWN:#判断是否按下下键
if event.key == locals.K_DOWN:#判断是否按下下键
a-=0.1#音量减小
if a < 0:#判断音量是否小于0
a=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