Пример #1
0
        static void EnterSelectFightType()
        {
            ScreenUtility.Click(1562, 814);

            // wait for 2s to ensure all fights are populated.
            AutoItX.Sleep(2000);
        }
Пример #2
0
        static void EnterMatch()
        {
            int position = _position;

            if (position == 0)
            {
                Console.WriteLine("Invalid position 0");
                return;
            }

            while (position > 2)
            {
                ScreenUtility.Drag(1500, 914, 1500, 314);
                position--;
            }

            if (position == 1)
            {
                ScreenUtility.Click(1500, 314);
            }
            else if (position == 2)
            {
                ScreenUtility.Click(1500, 914);
            }
        }
Пример #3
0
        static void OpenChest(int runCount)
        {
            //bool existsMainWindow = MainWindowUtility.ExistsMainWindow();

            //if (!existsMainWindow && !ScreenUtility.IsForegroundFullScreen())
            //{
            //    Console.WriteLine("No main window exist");
            //    return;
            //}

            //if (existsMainWindow)
            //{
            //    MainWindowUtility.ActivateAndWait();
            //}

            // open chest
            for (int i = 0; i < runCount; ++i)
            {
                ScreenUtility.Click(177, 877);

                AutoItX.Sleep(1000);
            }

            return;
        }
Пример #4
0
        public void EnableAutomation()
        {
            ScreenUtility.Click(xCord, yCord);

            recentColors.Clear();

            AutomationEnabled = true;
        }
Пример #5
0
        static void SelectPartner()
        {
            // select first partner if possible
            ScreenUtility.Click(1120, 280);
            AutoItX.Sleep(1000);

            // click 开始
            ScreenUtility.Click(1478, 920);
        }
Пример #6
0
        static void SelectWantedDifficulty()
        {
            // 选择 传奇
            ScreenUtility.Click(400, 900);
            AutoItX.Sleep(1000);

            // for rush
            // ScreenUtility.Click(1020, 920);
            // click 开始游戏
            ScreenUtility.Click(1460, 920);
        }
Пример #7
0
        public static void Handle(GameState state)
        {
            if (_dialogs.ContainsKey(state))
            {
                var tuple = _dialogs[state];

                Console.WriteLine("{0} handled, click on <{1}, {2}>", state, tuple.Item1, tuple.Item2);

                ScreenUtility.Click(tuple.Item1, tuple.Item2);
            }
        }
Пример #8
0
 static void GoBackMainWindowFromWantedOrElementChallenge()
 {
     // 点击 返回主界面箭头
     ScreenUtility.Click(76, 94);
 }
Пример #9
0
 static void TouchToContinue()
 {
     ScreenUtility.Click(1168, 985);
 }
Пример #10
0
 static void SelectedEquipment()
 {
     // click the 继续
     ScreenUtility.Click(1478, 920);
 }
Пример #11
0
 static void SelectElementChallengeLevel()
 {
     // click 开始游戏
     ScreenUtility.Click(1460, 920);
 }
Пример #12
0
 static void SelectElementChallenge()
 {
     // click 开始
     ScreenUtility.Click(1260, 928);
 }
Пример #13
0
 static void SelectWanted()
 {
     // click 开始
     ScreenUtility.Click(1260, 928);
 }
Пример #14
0
        static void SelectDungeonGrade(DayOfWeek weekday)
        {
            if (weekday == DayOfWeek.Sunday || weekday == DayOfWeek.Saturday)
            {
                throw new ArgumentOutOfRangeException();
            }

            int grade = _grade;

            switch (weekday)
            {
            case DayOfWeek.Monday:
            {
                int xCord = 1478;
                // 普通,困难,专家
                int[] yCords = new int[] { 310, 460, 610 };

                if (grade > yCords.Length)
                {
                    grade = yCords.Length;
                }

                ScreenUtility.Click(xCord, yCords[grade - 1]);
                AutoItX.Sleep(1000);
                break;
            }

            case DayOfWeek.Tuesday:
            {
                int xCord = 1478;
                // 普通,困难,专家,史诗
                int[] yCords = new int[] { 310, 460, 610, 760 };

                if (grade > yCords.Length)
                {
                    grade = yCords.Length;
                }

                ScreenUtility.Click(xCord, yCords[grade - 1]);
                AutoItX.Sleep(1000);
                break;
            }

            case DayOfWeek.Wednesday:
            {
                int xCord = 1478;
                // 普通,困难,专家,史诗
                int[] yCords = new int[] { 310, 460, 610, 760 };

                if (grade > yCords.Length)
                {
                    grade = yCords.Length;
                }

                ScreenUtility.Click(xCord, yCords[grade - 1]);
                AutoItX.Sleep(1000);
                break;
            }

            case DayOfWeek.Thursday:
            {
                //Thursday: 清流 320,烈焰440, 自然 560, 半影 680, 多彩810
                int   xCord  = 1478;
                int[] yCords = new int[5] {
                    320, 440, 560, 680, 810
                };

                if (grade > yCords.Length)
                {
                    grade = yCords.Length;
                }

                ScreenUtility.Click(xCord, yCords[grade - 1]);
                AutoItX.Sleep(1000);
                break;
            }

            case DayOfWeek.Friday:
            {
                int xCord = 1478;
                // 史诗, 传奇
                int[] yCords = new int[] { 320, 470 };

                if (grade > yCords.Length)
                {
                    grade = yCords.Length;
                }

                ScreenUtility.Click(xCord, yCords[grade - 1]);
                AutoItX.Sleep(1000);
                break;
            }

            default:
                throw new ArgumentOutOfRangeException();
            }

            // click 继续
            ScreenUtility.Click(1478, 920);
        }