feat(task): 新增对游戏启动时的更新处理
This commit is contained in:
parent
9d90baa2c5
commit
7a084583ed
|
@ -5,6 +5,7 @@ from time import sleep
|
||||||
from kotonebot import task, device, image, cropped
|
from kotonebot import task, device, image, cropped
|
||||||
from . import R
|
from . import R
|
||||||
from .common import Priority
|
from .common import Priority
|
||||||
|
from .actions.loading import loading
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -21,12 +22,17 @@ def start_game():
|
||||||
sleep(2)
|
sleep(2)
|
||||||
device.click_center()
|
device.click_center()
|
||||||
while True:
|
while True:
|
||||||
|
while loading():
|
||||||
|
sleep(3)
|
||||||
with device.pinned():
|
with device.pinned():
|
||||||
if image.find(R.Daily.ButtonHomeCurrent):
|
if image.find(R.Daily.ButtonHomeCurrent):
|
||||||
break
|
break
|
||||||
# [screenshots/startup/announcement1.png]
|
# [screenshots/startup/announcement1.png]
|
||||||
elif image.find(R.Common.ButtonIconClose):
|
elif image.find(R.Common.ButtonIconClose):
|
||||||
device.click()
|
device.click()
|
||||||
|
# [screenshots/startup/update.png]
|
||||||
|
elif image.find(R.Common.ButtonConfirm):
|
||||||
|
device.click()
|
||||||
else:
|
else:
|
||||||
device.click_center()
|
device.click_center()
|
||||||
sleep(2)
|
sleep(2)
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 333 KiB |
Loading…
Reference in New Issue