上传文件至 ''

This commit is contained in:
206530122 2021-06-18 17:30:45 +08:00
parent 170bdc31fc
commit f76bcd0b00
1 changed files with 17 additions and 0 deletions

View File

@ -11,3 +11,20 @@ class GameSound(object):
def playBombSound(self):
pygame.mixer.Sound.play(self.__bomb) # 爆炸音乐
class Bomb(object):
# 初始化爆炸
def __init__(self, screen, type):
self.screen = screen
if type == 'enemy':
# 加载爆炸资源
self.mImages = [
pygame.image.load("./feiji/enemy0_down" + str(v) + ".png") for v in range(1, 5)]
else:
# 加载爆炸资源
self.mImages = [pygame.image.load(
"./feiji/hero_destroy" + str(v) + ".png") for v in range(1, 4)]
self.mImages += self.mImages