public static void Main() { try { using var app = new AutoArknights(); app.Run(); } catch (Exception e) { Log.Error(e.Message, withTime: true); Log.Debug(e.StackTrace); XConsole.AnyKey(); } }
public void Run() { var cin = new Cin(); var mode = cin.Get <RepeatLevelAction.Mode>("输入模式"); int repeatTime = -1; if (mode == RepeatLevelAction.Mode.SpecifiedTimes || mode == RepeatLevelAction.Mode.SpecTimesWithWait) { repeatTime = cin.Get <int>("输入刷关次数"); } _automation.Actions.Enqueue(new RepeatLevelAction(mode, repeatTime)); _automation.DoAll(); Console.Beep(); XConsole.AnyKey("所有任务完成"); }