Commit 92462b4c by BellCodeEditor

save project

parent 0ef83f2c
Showing with 12 additions and 7 deletions
......@@ -20,6 +20,8 @@ while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
if event.type==locals.KEYDOWN:
if event.key==locals.K_UP:
v+=0.1
......@@ -32,13 +34,16 @@ while True:
v=-1
pygame.mixer.music.set_volume(v)
if event.type==locals.MOUSEBUTTONDOWN:
c+=1
if c%2==0:
pygame.mixer.music.unpause()
p=stop_img
else:
pygame.mixer.music.pause()
p=play_img
if event.button == 1:
x,y= event.pos
if x>270 and x<370 and y>330 and y<430:
c+=1
if c%2==0:
pygame.mixer.music.unpause()
p=stop_img
else:
pygame.mixer.music.pause()
p=play_img
if pygame.mixer.music.get_busy==False:
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