From b64bfd8df24c4329f0edfc6b25222539dd513fc1 Mon Sep 17 00:00:00 2001 From: ppqz7ofga <1377053057@qq.com> Date: Tue, 30 Apr 2024 19:33:25 +0800 Subject: [PATCH] ADD file via upload --- Zombie.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Zombie.py diff --git a/Zombie.py b/Zombie.py new file mode 100644 index 0000000..d159959 --- /dev/null +++ b/Zombie.py @@ -0,0 +1,15 @@ +# Zombie.py +import pygame +from Enemy import Enemy + + +# 僵尸类 +class Zombie(Enemy): + def __init__(self, x, y): + super(Zombie, self).__init__() + self.image = pygame.image.load(f"imgs/{__name__}.png") + self.rect = self.image.get_rect() + self.rect.x = x + self.rect.y = y + + self.damage = 2