微调攻击范围
This commit is contained in:
parent
0b45d46fdb
commit
8fd178cf47
@ -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
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user