# 关于游戏中各种声音效果的模块 import pygame def voice_large(): # 外星人到达了屏幕底部或者撞到飞船的大爆炸声 explosion_large = pygame.mixer.Sound("musics/Explo_Large.wav") explosion_large.play() def voice_small(): # 增加子弹和外星人碰撞的小爆炸声 explosion_small = pygame.mixer.Sound("musics/Explo_Small.wav") explosion_small.play() def bullet_biu(): # 增加子弹射出的biu声 bullet_whiz = pygame.mixer.Sound("musics/Bullet_biu.wav") bullet_whiz.play() def bg_music(): # 游戏背景音乐(若游戏开始就一直播放) pygame.mixer.music.load("musics/order_music.mp3")