mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 10:32:19 +08:00
Merge branch 'zzyyyl-feat/1-7'
This commit is contained in:
@@ -169,6 +169,10 @@ bool ProcessTask::_run()
|
||||
case ProcessTaskAction::SwipeToTheRight:
|
||||
exec_swipe_task(cur_task_ptr->action);
|
||||
break;
|
||||
case ProcessTaskAction::SlowlySwipeToTheLeft:
|
||||
case ProcessTaskAction::SlowlySwipeToTheRight:
|
||||
exec_slowly_swipe_task(cur_task_ptr->action);
|
||||
break;
|
||||
case ProcessTaskAction::DoNothing:
|
||||
break;
|
||||
case ProcessTaskAction::Stop:
|
||||
@@ -242,3 +246,23 @@ void asst::ProcessTask::exec_swipe_task(ProcessTaskAction action)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void asst::ProcessTask::exec_slowly_swipe_task(ProcessTaskAction action)
|
||||
{
|
||||
LogTraceFunction;
|
||||
static Rect right_rect = Task.get("ProcessTaskSlowlySwipeRightRect")->specific_rect;
|
||||
static Rect left_rect = Task.get("ProcessTaskSlowlySwipeLeftRect")->specific_rect;
|
||||
static int duration = Task.get("ProcessTaskSlowlySwipeRightRect")->pre_delay;
|
||||
static int extra_delay = Task.get("ProcessTaskSlowlySwipeRightRect")->rear_delay;
|
||||
|
||||
switch (action) {
|
||||
case asst::ProcessTaskAction::SlowlySwipeToTheLeft:
|
||||
Ctrler.swipe(left_rect, right_rect, duration, true, extra_delay, true);
|
||||
break;
|
||||
case asst::ProcessTaskAction::SlowlySwipeToTheRight:
|
||||
Ctrler.swipe(right_rect, left_rect, duration, true, extra_delay, true);
|
||||
break;
|
||||
default: // 走不到这里,TODO 报个错
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user