mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 18:20:39 +08:00
style.项目、文件名统一化
This commit is contained in:
36
src/MeoAssistant/ProcessTask.h
Normal file
36
src/MeoAssistant/ProcessTask.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include "AbstractTask.h"
|
||||
#include "AsstDef.h"
|
||||
|
||||
namespace asst
|
||||
{
|
||||
// 流程任务,按照配置文件里的设置的流程运行
|
||||
class ProcessTask : public AbstractTask
|
||||
{
|
||||
public:
|
||||
using AbstractTask::AbstractTask;
|
||||
ProcessTask(const AbstractTask& abs, std::vector<std::string> tasks_name);
|
||||
ProcessTask(AbstractTask&& abs, std::vector<std::string> tasks_name) noexcept;
|
||||
|
||||
virtual ~ProcessTask() = default;
|
||||
|
||||
void set_tasks(std::vector<std::string> tasks_name) noexcept
|
||||
{
|
||||
m_cur_tasks_name = std::move(tasks_name);
|
||||
}
|
||||
void set_times_limit(std::string name, int limit)
|
||||
{
|
||||
m_times_limit.emplace(std::move(name), limit);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual bool _run() override;
|
||||
void exec_click_task(const Rect& matched_rect);
|
||||
void exec_swipe_task(ProcessTaskAction action);
|
||||
|
||||
std::vector<std::string> m_cur_tasks_name;
|
||||
std::unordered_map<std::string, int> m_times_limit;
|
||||
std::unordered_map<std::string, int> m_exec_times;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user