Exemplo n.º 1
0
        /// <summary>
        /// Clicks the pixel's point and resets timer object.
        /// </summary>
        /// <param name="GamePoint"></param>
        public void Click(Point GamePoint)
        {
            log.Info("Clicking Point " + GamePoint.ToString());

            if (Timer.IsRunning)
            {
                ResetTimer();
            }

            StartTimer();

            //ADB bot click
            if (IsAdbBot)
            {
                AdbApp.Click(GamePoint);

                return;
            }

            if (Screen.GetType() == typeof(Rectangle))
            {
                Point screenPoint = ScreenObj.PointToScreenPoint(Screen, GamePoint.X, GamePoint.Y); //Convert game point to screen point

                Mouse.LeftMouseClick(screenPoint.X, screenPoint.Y);                                 //click screen point
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Updates Screen object's Rectangle and Point.
        /// </summary>
        /// <param name="App"></param>
        public void UpdateScreen(Process App)
        {
            if (IsAdbBot)
            {
                Screen = new Bitmap(AdbApp.ScreenCap());

                return;
            }
            log.Info("Updated Screen object for " + BotName);

            Screen = ScreenObj.GetRect(App);
        }