/// <summary>
        /// Takes a screenshot of the current game window and retrieves a thumbnail of it. Compare that image
        /// with an already preloaded thumbnail of the pre-game after-login screen. Return whether or not they are most likely the same image.
        /// </summary>
        /// <returns>true if the current window image matches the preloaded image, false otherwise</returns>
        private bool MatchesActiveScreen()
        {
            // Capture the window image to figure out what step we are on
            Bitmap windowImage         = ImageWizard.GetThumbnailOfWindow(Game.Window);
            double percentageToBeOnSet = ImageWizard.getPercentagePixelMatch(_screenValidationImage, windowImage);

            Console.WriteLine("Step Chance: {0}%", percentageToBeOnSet);
            return(percentageToBeOnSet >= 85.0);
        }
 /// <summary>
 /// Constructs an instruction set to select the daily reward
 /// </summary>
 /// <param name="game"></param>
 public InGameRewardInstructionSet(SteamGame game) : base(game)
 {
     // Load an image to help validate if we are on the game screen with the rewards up
     _screenValidationImage = ImageWizard.LoadImage("Paladins\\images\\DailyRewardScreenThumbnail.png");
 }
 /// <summary>
 /// Constructs the instruction set
 /// </summary>
 /// <param name="game">the Steam game to run the instructions on</param>
 public LoadingGameScreenInstructionSet(SteamGame game) : base(game)
 {
     // Load an image to help validate if we are on the pre-game after-login screen
     _screenValidationImage = ImageWizard.LoadImage("Paladins\\images\\ReadyToPlayScreenThumbnail.png");
 }
示例#4
0
 /// <summary>
 /// Constructs the login instruction set
 /// </summary>
 /// <param name="game">the Steam game to run the instructions on</param>
 public LoginInstructionSet(SteamGame game) : base(game)
 {
     // Load an image to help validate if we are on the login screen
     _screenValidationImage = ImageWizard.LoadImage("Paladins\\images\\LoginScreenThumbnail.png");
 }