public static async Task <int[]> WaitCatchGame() { while (true) { int[] returnValue = new int[3]; int[] result = ImgSearch.UseImageSearch(0, 0, screenWindowX, screenWindowY, @"Image\SelectChampion.png"); if (ImgSearch.UseImageSearch(0, 0, screenWindowX, screenWindowY, @"Image\FindNomalGame.png") != null) { gameType = GameType.비공개_선택; } if (ImgSearch.UseImageSearch(0, 0, screenWindowX, screenWindowY, @"Image\FindRandomGame.png") != null) { gameType = GameType.무작위_총력전; } if (result != null) { returnValue[0] = result[0]; returnValue[1] = result[1]; returnValue[2] = (int)gameType; return(returnValue); } await Task.Delay(1000); } }
public static int[] GameWindowPostion() { int[] result = ImgSearch.UseImageSearch(0, 0, screenWindowX, screenWindowY, @"Image\SelectChampion.png"); if (result == null) { result = new int[] { -1, -1 }; } else { result[0] -= 433; result[1] -= 678; } return(result); }
public static bool UserIsSelect(int windowsYPostion, int userNumber) { int YAsXisGap = 120 + windowsYPostion + userNumber * 80; for (int SpellIndex = 0; SpellIndex < SpellNames.Length; SpellIndex++) { int[] result = ImgSearch.UseImageSearch(0, YAsXisGap, screenWindowX, screenWindowY, @"Image\" + SpellNames[SpellIndex] + ".png"); if (result == null) { continue; } else if (result[1] > YAsXisGap && result[1] < YAsXisGap + 80) { return(true); } } return(false); }
public static bool NewGame() { while (true) { int[] result = ImgSearch.UseImageSearch(0, 0, screenWindowX, screenWindowY, @"Image\FindNomalGame.png"); if (result != null) { return(true); } result = ImgSearch.UseImageSearch(0, 0, screenWindowX, screenWindowY, @"Image\FindRandomGame.png"); if (result != null) { return(true); } return(false); } }