修复没有铲子关卡自动检测铲子点击导致闪退的bug
This commit is contained in:
parent
8b74d2cc38
commit
b2a7c22be6
@ -768,15 +768,16 @@ class Level(tool.State):
|
|||||||
self.showLittleMenu = True
|
self.showLittleMenu = True
|
||||||
# 播放点击音效
|
# 播放点击音效
|
||||||
c.SOUND_BUTTON_CLICK.play()
|
c.SOUND_BUTTON_CLICK.play()
|
||||||
elif self.inArea(self.shovel_box_rect, *mouse_pos):
|
elif self.hasShovel:
|
||||||
self.drag_shovel = not self.drag_shovel
|
if self.inArea(self.shovel_box_rect, *mouse_pos):
|
||||||
if not self.drag_shovel:
|
self.drag_shovel = not self.drag_shovel
|
||||||
self.removeMouseImagePlus()
|
if not self.drag_shovel:
|
||||||
# 播放点击铲子的音效
|
self.removeMouseImagePlus()
|
||||||
c.SOUND_SHOVEL.play()
|
# 播放点击铲子的音效
|
||||||
elif self.drag_shovel:
|
c.SOUND_SHOVEL.play()
|
||||||
# 移出这地方的植物
|
elif self.drag_shovel:
|
||||||
self.shovelRemovePlant(mouse_pos)
|
# 移出这地方的植物
|
||||||
|
self.shovelRemovePlant(mouse_pos)
|
||||||
|
|
||||||
for car in self.cars:
|
for car in self.cars:
|
||||||
if car:
|
if car:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user