Commit 92462b4c by BellCodeEditor

save project

parent 0ef83f2c
Showing with 5 additions and 0 deletions
...@@ -20,6 +20,8 @@ while True: ...@@ -20,6 +20,8 @@ while True:
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:
v+=0.1 v+=0.1
...@@ -32,6 +34,9 @@ while True: ...@@ -32,6 +34,9 @@ while True:
v=-1 v=-1
pygame.mixer.music.set_volume(v) pygame.mixer.music.set_volume(v)
if event.type==locals.MOUSEBUTTONDOWN: if event.type==locals.MOUSEBUTTONDOWN:
if event.button == 1:
x,y= event.pos
if x>270 and x<370 and y>330 and y<430:
c+=1 c+=1
if c%2==0: if c%2==0:
pygame.mixer.music.unpause() pygame.mixer.music.unpause()
......
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