private void Start_Button_Click(object sender, RoutedEventArgs e) { if (running) { return; } else if (!localFound) { logger.Log("No LocalPlayer found."); return; } InputManager.SetActiveWindow("Client_tos"); GrindBot bot = new GrindBot(pathManager); DispatcherTimer botTimer = timerManager.CreateTimer(25, true); botTimer.Tick += (s, e1) => { botTimer_Tick(s, e1, bot); }; botTimer.Start(); running = true; }
private void botTimer_Tick(object sender, EventArgs e, GrindBot bot) { bot.OnTick(); }