You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
434 B
18 lines
434 B
10 months ago
|
# 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
|