Files
better-genshin-impact/BetterGenshinImpact/Core/Script/Dependence/AutoPathingScript.cs
2024-10-13 22:58:42 +08:00

21 lines
574 B
C#

using BetterGenshinImpact.GameTask.AutoPathing;
using BetterGenshinImpact.GameTask.AutoPathing.Model;
using System.Threading.Tasks;
namespace BetterGenshinImpact.Core.Script.Dependence;
public class AutoPathingScript(string rootPath)
{
public async Task Run(string json)
{
var task = PathingTask.BuildFromJson(json);
await new PathExecutor(CancellationContext.Instance.Cts).Pathing(task);
}
public async Task RunFile(string path)
{
var json = await new LimitedFile(rootPath).ReadText(path);
await Run(json);
}
}