StarRailCopilot/src.py

37 lines
1.2 KiB
Python
Raw Normal View History

2023-06-17 17:07:14 +00:00
from module.alas import AzurLaneAutoScript
from module.logger import logger
class StarRailCopilot(AzurLaneAutoScript):
def restart(self):
from tasks.login.login import Login
Login(self.config, device=self.device).app_restart()
def start(self):
from tasks.login.login import Login
Login(self.config, device=self.device).app_start()
def goto_main(self):
from tasks.login.login import Login
from tasks.base.ui import UI
if self.device.app_is_running():
logger.info('App is already running, goto main page')
UI(self.config, device=self.device).ui_goto_main()
else:
logger.info('App is not running, start app and goto main page')
Login(self.config, device=self.device).app_start()
UI(self.config, device=self.device).ui_goto_main()
2023-06-17 17:09:09 +00:00
def dungeon(self):
from tasks.dungeon.dungeon import Dungeon
Dungeon(config=self.config, device=self.device).run()
2023-06-18 10:41:58 +00:00
def daily_quest(self):
from tasks.daily.daily_quest import DailyQuestUI
DailyQuestUI(config=self.config, device=self.device).run()
2023-06-17 17:07:14 +00:00
if __name__ == '__main__':
src = StarRailCopilot('src')
src.loop()