增加部分素材
BIN
resources/graphics/Plants/StarFruit/StarFruit_0.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
resources/graphics/Plants/StarFruit/StarFruit_1.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
resources/graphics/Plants/StarFruit/StarFruit_2.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
resources/graphics/Plants/StarFruit/StarFruit_3.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
resources/graphics/Plants/StarFruit/StarFruit_4.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
resources/graphics/Plants/StarFruit/StarFruit_5.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
resources/graphics/Plants/StarFruit/StarFruit_6.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
resources/graphics/Plants/StarFruit/StarFruit_7.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
resources/graphics/Plants/StarFruit/StarFruit_8.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
resources/graphics/Plants/StarFruit/StarFruit_9.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
resources/graphics/Plants/TorchWood/TorchWood_0.png
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
resources/graphics/Plants/TorchWood/TorchWood_1.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
resources/graphics/Plants/TorchWood/TorchWood_2.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
resources/graphics/Plants/TorchWood/TorchWood_3.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
resources/graphics/Plants/TorchWood/TorchWood_4.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
resources/graphics/Plants/TorchWood/TorchWood_5.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
@ -106,6 +106,17 @@ class Bullet(pg.sprite.Sprite):
|
|||||||
def draw(self, surface):
|
def draw(self, surface):
|
||||||
surface.blit(self.image, self.rect)
|
surface.blit(self.image, self.rect)
|
||||||
|
|
||||||
|
class StarBullet(Bullet):
|
||||||
|
def __init__(self, x, y, name):
|
||||||
|
self.name = name
|
||||||
|
self.frames = []
|
||||||
|
self.frame_index = 0
|
||||||
|
self.load_images()
|
||||||
|
self.image = self.frames[self.frame_index]
|
||||||
|
self.rect = self.image.get_rect()
|
||||||
|
self.rect.x = x
|
||||||
|
self.rect.y = y
|
||||||
|
|
||||||
|
|
||||||
class Plant(pg.sprite.Sprite):
|
class Plant(pg.sprite.Sprite):
|
||||||
def __init__(self, x, y, name, health, bullet_group, scale=1):
|
def __init__(self, x, y, name, health, bullet_group, scale=1):
|
||||||
|
|||||||