/// <summary> /// Calculates the number of text pixels in the dialog body /// </summary> /// <returns>the number of pixels of text in the dialog body</returns> protected int DialogBodyText() { Screen.ReadWindow(); bool[,] dialogBody = Vision.ColorFilterPiece(DialogBody, DialogTextLeft, DialogTextRight, DialogTextTop, DialogTextBottom); return(ImageProcessing.MatchCount(dialogBody)); }
public HandEye(Vision vision, GameScreen screen) { Vision = vision; Screen = screen; }
/// <summary> /// Calculates a color hash of the title of the dialog box /// </summary> /// <returns></returns> protected long DialogTitleHash() { Screen.ReadWindow(); Color[,] dialogTitle = Vision.ScreenPiece(DialogTitleLeft, DialogTitleRight, DialogTitleTop, DialogTitleBottom); return(ImageProcessing.ColorSum(dialogTitle)); }