更新 'alien_invasion.py'

This commit is contained in:
201110132 2021-06-24 09:10:02 +08:00
parent 646fc79239
commit 3ae4df4366
1 changed files with 5 additions and 1 deletions

View File

@ -37,7 +37,11 @@ class AlienInvasion:
# 创建Play按钮
self.play_button = Button(self,"Play")
# 背景音乐
pygame.mixer.music.load('music/flash.mp3')
pygame.mixer.music.play(-1) # 重复循环
# 设置背景色
self.bg_color = (230, 230, 230)