mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-06-09 20:04:52 +00:00
fix: update ui assets and circle for jp
This commit is contained in:
@@ -3,6 +3,17 @@ from module.base.button import Button, ButtonWrapper
|
||||
# This file was auto-generated, do not modify it manually. To generate:
|
||||
# ``` python -m dev_tools.button_extract ```
|
||||
|
||||
CIRCLE = ButtonWrapper(
|
||||
name='CIRCLE',
|
||||
jp=Button(
|
||||
file='./assets/jp/circle/CIRCLE.png',
|
||||
area=(197, 315, 228, 350),
|
||||
search=(177, 295, 248, 370),
|
||||
color=(166, 215, 235),
|
||||
button=(188, 299, 435, 456),
|
||||
),
|
||||
en=None,
|
||||
)
|
||||
GET_REWARD_AP = ButtonWrapper(
|
||||
name='GET_REWARD_AP',
|
||||
jp=Button(
|
||||
|
||||
+20
-2
@@ -1,8 +1,9 @@
|
||||
from enum import Enum
|
||||
|
||||
from module.base.decorator import Config
|
||||
from module.base.timer import Timer
|
||||
from module.logger import logger
|
||||
from tasks.base.page import page_circle
|
||||
from tasks.base.page import page_circle, MAIN_GO_TO_CIRCLE, CIRCLE_CHECK
|
||||
from tasks.base.ui import UI
|
||||
from tasks.circle.assets.assets_circle import *
|
||||
|
||||
@@ -17,6 +18,23 @@ class CircleStatus(Enum):
|
||||
|
||||
|
||||
class Circle(UI):
|
||||
@Config.when(Emulator_GameLanguage='jp')
|
||||
def _enter_circle(self):
|
||||
self.ui_goto_main()
|
||||
action_timer = Timer(1, 8)
|
||||
while not self.appear(CIRCLE_CHECK):
|
||||
self.device.screenshot()
|
||||
if not action_timer.reached_and_reset():
|
||||
continue
|
||||
if self.appear_then_click(CIRCLE):
|
||||
continue
|
||||
else:
|
||||
self.device.click(MAIN_GO_TO_CIRCLE)
|
||||
|
||||
@Config.when(Emulator_GameLanguage=None)
|
||||
def _enter_circle(self):
|
||||
self.ui_ensure(page_circle)
|
||||
|
||||
def _handle_circle(self, status):
|
||||
match status:
|
||||
case CircleStatus.REWARD:
|
||||
@@ -31,7 +49,7 @@ class Circle(UI):
|
||||
return status
|
||||
|
||||
def run(self):
|
||||
self.ui_ensure(page_circle)
|
||||
self._enter_circle()
|
||||
|
||||
status = CircleStatus.REWARD
|
||||
action_timer = Timer(0.5)
|
||||
|
||||
Reference in New Issue
Block a user