Commit 8c69ba99 by BellCodeEditor

save project

parent 347bf0db
Showing with 12 additions and 1 deletions
...@@ -12,13 +12,18 @@ last_img = pygame.image.load('last.png') # 上一曲按钮 ...@@ -12,13 +12,18 @@ last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮 next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 中间logo logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load('歌曲4.ogg') pygame.mixer.music.load('歌曲4.ogg')
asdwwwwas = ['歌曲4.ogg','歌曲1.wav','歌曲2.wav','歌曲3.wav']
a=0.2 a=0.2
pygame.mixer.music.set_volume(a) pygame.mixer.music.set_volume(a)
ades = 2 ades = 2
b = stop_img b = stop_img
x,y = (0,0)
m = -1
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
print(event)
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
if event.type==locals.KEYDOWN: if event.type==locals.KEYDOWN:
...@@ -33,6 +38,8 @@ while True: ...@@ -33,6 +38,8 @@ while True:
a=0 a=0
pygame.mixer.music.set_volume(a) pygame.mixer.music.set_volume(a)
if event.type == locals.MOUSEBUTTONDOWN: if event.type == locals.MOUSEBUTTONDOWN:
if button == 1:
if
ades += 1 ades += 1
if ades % 2 == 1: if ades % 2 == 1:
pygame.mixer.music.pause() pygame.mixer.music.pause()
...@@ -42,6 +49,10 @@ while True: ...@@ -42,6 +49,10 @@ while True:
b = stop_img b = stop_img
if pygame.mixer.music.get_busy()==False: if pygame.mixer.music.get_busy()==False:
m += 1
if m > len(asdwwwwas)-1:
m = 0
pygame.mixer.music.load(asdwwwwas[m])
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