mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-05-25 10:05:49 +08:00
22 lines
552 B
C#
22 lines
552 B
C#
using System.IO;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using BetterGenshinImpact.Core.Recorder;
|
|
using BetterGenshinImpact.Core.Script;
|
|
|
|
namespace BetterGenshinImpact.Model.Gear.Tasks;
|
|
|
|
public class KeyMouseGearTask : BaseGearTask
|
|
{
|
|
public KeyMouseGearTask(string path)
|
|
{
|
|
FilePath = path;
|
|
}
|
|
|
|
public override async Task Run(CancellationToken ct)
|
|
{
|
|
// 加载并执行
|
|
var json = await File.ReadAllTextAsync(FilePath, ct);
|
|
await KeyMouseMacroPlayer.PlayMacro(json, ct, false);
|
|
}
|
|
} |