diff --git a/Sunflower.py b/Sunflower.py new file mode 100644 index 0000000..a37be7e --- /dev/null +++ b/Sunflower.py @@ -0,0 +1,17 @@ +# Sunflower.py +import pygame +from Plant import Plant + + +# 向日葵类 +class Sunflower(Plant): + def __init__(self, x, y): + super(Sunflower, self).__init__() + self.image = pygame.image.load("imgs/sunflower.png") + self.rect = self.image.get_rect() + self.rect.x = x + self.rect.y = y + self.price = 50 + self.hp = 100 + # 时间计数器 + self.time_count = 0