更新 'alien_invasion,py'
This commit is contained in:
parent
5ef5ab2e0f
commit
6d9829afdd
|
@ -32,6 +32,12 @@ def run_game():
|
|||
# 创建外星人群
|
||||
gf.create_fleet(ai_settings, screen, ship, aliens)
|
||||
|
||||
# 背景音乐
|
||||
pygame.mixer.music.load('music/Synth_Element.ogg')
|
||||
pygame.mixer.music.play(-1) # 重复循环
|
||||
# 游戏背景
|
||||
pygame.display.flip()
|
||||
background = pygame.image.load('images/1124.bmp').convert()
|
||||
|
||||
|
||||
# 开始游戏的主循环
|
||||
while True:
|
||||
gf.check_events(ai_settings, screen, stats, sb, play_button, ship,
|
||||
aliens, bullets)
|
Loading…
Reference in New Issue