Commit b3a4feb8 by BellCodeEditor

save project

parent 3d9fa1c8
Showing with 13 additions and 0 deletions
...@@ -14,6 +14,10 @@ logo_img = pygame.image.load('logo.png') # 中间logo ...@@ -14,6 +14,10 @@ logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load("歌曲3.wav") pygame.mixer.music.load("歌曲3.wav")
yl=0.2 yl=0.2
pygame.mixer.music.set_volume(yl) pygame.mixer.music.set_volume(yl)
fj=0
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type==locals.QUIT: if event.type==locals.QUIT:
...@@ -29,6 +33,15 @@ while True: ...@@ -29,6 +33,15 @@ while True:
if yl<0: if yl<0:
yl=0 yl=0
pygame.mixer.music.set_volume(yl) pygame.mixer.music.set_volume(yl)
if event.type==locals.MOUSEBUTTONDOWN:
dj+=1
if dj%2==0:
pygame.mixer.music.unpause()
else:
pygame.mixer.music.pause()
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