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

Refactor: Gacha module

This commit is contained in:
LmeSzinc
2021-10-03 00:36:14 +08:00
parent fe46b8ad93
commit 77ace49c2e
13 changed files with 228 additions and 24 deletions

View File

@@ -25,7 +25,6 @@ class GachaUI(UI):
Returns:
bool: Whether expected assets loaded completely
"""
confirm_timer = Timer(1.5, count=3).start()
ensure_timeout = Timer(3, count=6).start()
while 1:
if skip_first_screenshot:
@@ -36,11 +35,7 @@ class GachaUI(UI):
# End
results = [self.appear(button) for button in GACHA_LOAD_ENSURE_BUTTONS]
if any(results):
if confirm_timer.reached():
return True
ensure_timeout.reset()
continue
confirm_timer.reset()
break
# Exception
if ensure_timeout.reached():