铲子使用后自动复原

This commit is contained in:
星外之神 2022-04-05 21:38:41 +08:00
parent 74e79df465
commit bfa4445b24

View File

@ -262,6 +262,9 @@ class Level(tool.State):
if (x >= i.rect.x and x <= i.rect.right and
y >= i.rect.y and y <= i.rect.bottom):
self.killPlant(i)
# 使用后默认铲子复原
self.drag_shovel = not self.drag_shovel
self.removeMouseImagePlus()
return
# 检查小铲子的位置有没有被点击