修复没有铲子关卡自动检测铲子点击导致闪退的bug

This commit is contained in:
星外之神 2022-07-28 16:42:48 +08:00
parent 8b74d2cc38
commit b2a7c22be6

View File

@ -768,7 +768,8 @@ 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:
if self.inArea(self.shovel_box_rect, *mouse_pos):
self.drag_shovel = not self.drag_shovel self.drag_shovel = not self.drag_shovel
if not self.drag_shovel: if not self.drag_shovel:
self.removeMouseImagePlus() self.removeMouseImagePlus()