Commit 8058f8a1 by BellCodeEditor

save project

parent c11dfa7f
Showing with 2 additions and 3 deletions
......@@ -4,8 +4,6 @@ from pygame import locals
pygame.init() # 初始化
# 创建窗口
screen = pygame.display.set_mode((640, 480))
pygame.mixer.music.load('歌曲')
pygame.mixer.music.paly()
# 载入图片、资源
bg_img = pygame.image.load('background.png') # 背景图
......@@ -15,6 +13,7 @@ last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 中间logo
pygame.mixer.music.load('歌曲4.ogg')
pygame.mixer.music.play()
while True:
for event in pygame.event.get():
......@@ -37,7 +36,7 @@ while True:
pygame.mixer.music.set_volume(volume)
if event.key == locals.K_DOWN:
volume -= 0.1
if volume < 0 <or volume==0:
if volume < 0 or volume==0:
volume = 0
pygame.mixer.music.set_volume(volume)
if event.type == locals.MOUSEBUTTONDOWN:
......
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