mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 12:08:21 +08:00
Refactor: module/device, separate all screenshot method and control methods
- Better screenshot and control retries, handle common exceptions
This commit is contained in:
@@ -46,7 +46,7 @@ class GlobeCamera(GlobeOperation, ZoneManager):
|
||||
vector = np.array(distance) * vector
|
||||
|
||||
vector = -vector
|
||||
self.device.swipe(vector, name=name, box=box)
|
||||
self.device.swipe_vector(vector, name=name, box=box)
|
||||
self.device.sleep(0.3)
|
||||
|
||||
self.globe_update()
|
||||
|
||||
@@ -67,8 +67,8 @@ class GlobeOperation(ActionPointHandler, MapEventHandler):
|
||||
"""
|
||||
if self.is_zone_pinned():
|
||||
# A click does not disable pinned zone, a swipe does.
|
||||
self.device.swipe((50, -50), box=area_pad(ZONE_PINNED.area, pad=-80), random_range=(-10, -10, 10, 10),
|
||||
padding=0, name='PINNED_DISABLE')
|
||||
self.device.swipe_vector((50, -50), box=area_pad(ZONE_PINNED.area, pad=-80), random_range=(-10, -10, 10, 10),
|
||||
padding=0, name='PINNED_DISABLE')
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user