From e8a169f321cf0ebeae5a219035ebf78d3be6da6e Mon Sep 17 00:00:00 2001 From: ppqz7ofga <1377053057@qq.com> Date: Tue, 30 Apr 2024 19:32:58 +0800 Subject: [PATCH] ADD file via upload --- Sunflower.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Sunflower.py 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