微调攻击范围

This commit is contained in:
星外之神 2022-05-03 13:30:19 +08:00
parent 0b45d46fdb
commit 8fd178cf47

View File

@ -596,7 +596,7 @@ class PuffShroom(Plant):
def canAttack(self, zombie): def canAttack(self, zombie):
if (self.rect.x <= zombie.rect.right and if (self.rect.x <= zombie.rect.right and
(self.rect.x + c.GRID_X_SIZE * 3.5 >= zombie.rect.x) and (zombie.rect.left <= c.SCREEN_WIDTH)): (self.rect.x + c.GRID_X_SIZE * 3.5 >= zombie.rect.x) and (zombie.rect.left <= c.SCREEN_WIDTH + 10)):
return True return True
return False return False