mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 03:58:22 +08:00
Fix: 修复截图速度过慢时出现的问题
当使用像以下结构的代码时, 需要增加触发计数
否则当截图耗时大于计时器触发时间时, 会触发错误的结果
if self.appear(MAIN_CHECK):
if confirm_timer.reached():
pass
else:
confirm_timer.reset()
This commit is contained in:
@@ -32,7 +32,7 @@ class ExerciseCombat(HpDaemon, OpponentChoose, ExerciseEquipment):
|
||||
bool: True if wins. False if quit.
|
||||
"""
|
||||
logger.info('Combat execute')
|
||||
self.low_hp_confirm_timer = Timer(self.config.LOW_HP_CONFIRM_WAIT)
|
||||
self.low_hp_confirm_timer = Timer(self.config.LOW_HP_CONFIRM_WAIT, count=2)
|
||||
self.low_hp_confirm_timer.start()
|
||||
show_hp_timer = Timer(5)
|
||||
success = True
|
||||
|
||||
Reference in New Issue
Block a user