1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 08:38:20 +08:00

Fix: Instance attribute grids defined outside __init__

This commit is contained in:
whoamikyo
2020-06-19 15:32:58 -03:00
parent 959f75baa0
commit 9fa44fc977

View File

@@ -33,6 +33,10 @@ class Camera(InfoHandler):
map: CampaignMap
camera = (0, 0)
def __init__(self, config, device=None):
super().__init__(config, device=None)
self.grids = Grids(self.device.image, config=self.config)
def _map_swipe(self, vector, drop_threshold=0.1):
"""
Args:
@@ -112,7 +116,7 @@ class Camera(InfoHandler):
return True
try:
self.grids = Grids(self.device.image, config=self.config)
pass
except Exception as e:
if self.info_bar_count():
logger.info('Perspective error cause by info bar. Waiting.')