Commit a48341ea by BellCodeEditor

save project

parent 8b2b59c1
Showing with 3 additions and 2 deletions
......@@ -5,7 +5,7 @@ pygame.init() # 初始化
# 创建窗口
screen = pygame.display.set_mode((640, 480))
pygame.mixer.music.load('歌曲4.ogg')
pygame.mixer.music.play()
# 载入图片、资源
bg_img = pygame.image.load('background.png') # 背景图
play_img = pygame.image.load('play.png') # 播放按钮
......@@ -18,7 +18,8 @@ while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
if pygame.mixer.music.get_busy == False
pygame.mixer.music.play()
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(stop_img, (270, 330)) # 暂停按钮
......
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