mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-03-29 10:09:49 +08:00
21 lines
574 B
C#
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);
|
|
}
|
|
}
|