mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-30 03:16:08 +00:00
Fix: 修复换装备滑动卡住的问题
This commit is contained in:
parent
acf73f5c17
commit
6d942764fd
@ -13,12 +13,14 @@ class Equipment(InfoBarHandler, PopupHandler):
|
|||||||
equipment_has_take_on = False
|
equipment_has_take_on = False
|
||||||
|
|
||||||
def _view_swipe(self, distance):
|
def _view_swipe(self, distance):
|
||||||
|
swipe_timer = Timer(3, count=3)
|
||||||
while 1:
|
while 1:
|
||||||
SWIPE_CHECK.load_color(self.device.image)
|
SWIPE_CHECK.load_color(self.device.image)
|
||||||
|
if not swipe_timer.started() or swipe_timer.reached():
|
||||||
|
swipe_timer.reset()
|
||||||
self.device.swipe(vector=(distance, 0), box=SWIPE_AREA.area, random_range=SWIPE_RANDOM_RANGE,
|
self.device.swipe(vector=(distance, 0), box=SWIPE_AREA.area, random_range=SWIPE_RANDOM_RANGE,
|
||||||
padding=0, duration=(0.1, 0.12))
|
padding=0, duration=(0.1, 0.12))
|
||||||
|
|
||||||
self.device.sleep(0.3)
|
|
||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
if SWIPE_CHECK.match(self.device.image):
|
if SWIPE_CHECK.match(self.device.image):
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user