Exemplo n.º 1
0
        private void ReloadMinigCrystals(string asteroidType)
        {
            if (asteroidType == "empty")
            {
                return;
            }
            var point = new Point(_areas[Constants.Areas.FirstMiningLaser].Top.X + 10, _areas[Constants.Areas.FirstMiningLaser].Top.Y + 10);

            _clicker.DoRightMouseClick(point);
            var crystals = GetAvailableCrystals(point);
            int crystalNumber;

            try
            {
                var neededCrystal = _crystalImages.First(z => z.Key == asteroidType).Value;
                crystalNumber = crystals.First(z => ImageWorker.AreBitmapsSameEquals(z.Value, neededCrystal)).Key;
            }
            catch
            {
                InitialCLick();
                return;
            }
            _clicker.OpenMenuAndClick(_areas[Constants.Areas.FirstMiningLaser], crystalNumber);
            _clicker.OpenMenuAndClick(_areas[Constants.Areas.SecondMiningLaser], crystalNumber);
        }
Exemplo n.º 2
0
        public void WarpToBookmark()
        {
            const int sleepTime = 40;

            _clicker.OpenMenuAndClick(_areas[Constants.Areas.BeltBookmark], 0);
            Thread.Sleep(TimeSpan.FromSeconds(sleepTime));
            var flag = false;

            for (var i = 0; i < 3; i++)
            {
                flag |= ImageWorker.AreBitmapsSameEquals(ImageWorker.GetBmp(new Point(615, 646), new Point(664, 658)),
                                                         _images["WarpImage"]);
            }
            if (flag)
            {
                WaitForWarp(-sleepTime);
            }
            else
            {
                WarpToBookmark();
            }
        }
Exemplo n.º 3
0
 public bool HaveEnoughShield()
 {
     return(ImageWorker.AreBitmapsSameEquals(_images["Shield"], ImageWorker.GetBmp(new Point(225, 513), 5, 5)));
 }