Exemplo n.º 1
0
        public Map(IAutoIt autoIt, IAssetCatalog assetCatalog, ILogger logger)
            : base(autoIt,
                assetCatalog,
                logger,
                @"Images\ALL\Game\Map\MapScreen_Hole_Idle.jpg",
                94, 61, 33, 43,
                0, 0, 800, 600)
        {
            _gopherHole = CreateTemplateButton(
                @"Images\ALL\Game\Map\MapScreen_Gopher_Idle.jpg",
                105, 54, 11, 45);

            _currentLocation = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\Map\MapScreen_Hole_Idle.jpg")
                .Copy(new Rectangle(94, 61, 33, 43));

            _openHole = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\Map\MapScreen_Hole_Small.jpg")
                .Copy(new Rectangle(96, 85, 27, 13));

            _zones = new List<Rectangle>
            {
                new Rectangle(108, 45, 147, 261),
                new Rectangle(50, 294, 235, 284),
                new Rectangle(300, 238, 204, 333),
                new Rectangle(298, 0, 240, 275),
                new Rectangle(540, 0, 249, 306),
                new Rectangle(513, 290, 287, 310)
            };
        }
Exemplo n.º 2
0
        public InGame(IAutoIt autoIt, IAssetCatalog assetCatalog, ILogger logger)
            : base(autoIt,
                assetCatalog,
                logger,
                @"Images\ALL\Game\gophers\burrow\Gopher_BUR_IDLE.jpg",
                15, 40, 12, 24,
                133, 517, 45, 79)
        {
            _gamePieces.Add(new TemplateCoordinate(182, 399, 53, 35));
            _gamePieces.Add(new TemplateCoordinate(259, 394, 53, 35));
            _gamePieces.Add(new TemplateCoordinate(336, 399, 53, 35));
            _gamePieces.Add(new TemplateCoordinate(413, 394, 53, 35));
            _gamePieces.Add(new TemplateCoordinate(490, 399, 53, 35));
            _gamePieces.Add(new TemplateCoordinate(567, 394, 53, 35));

            _menuButton = CreateCoordinateButton(12, 537, 74, 18);
            _mapButton = CreateCoordinateButton(12, 472, 73, 14);
            _exitConfirmButton = CreateCoordinateButton(208, 343, 149, 34);

            var backgroundRectangle = new Rectangle(351, 274, 69, 26);
            _backgrounds = new List<Image<Bgra, byte>>
            {
                assetCatalog.GetCompositeImage(@"Images\ALL\Game\backgrounds\BG_01.jpg")
                    .Copy(backgroundRectangle),
                assetCatalog.GetCompositeImage(@"Images\ALL\Game\backgrounds\BG_02.jpg")
                    .Copy(backgroundRectangle),
                assetCatalog.GetCompositeImage(@"Images\ALL\Game\backgrounds\BG_03.jpg")
                    .Copy(backgroundRectangle),
                assetCatalog.GetCompositeImage(@"Images\ALL\Game\backgrounds\BG_04.jpg")
                    .Copy(backgroundRectangle),
                assetCatalog.GetCompositeImage(@"Images\ALL\Game\backgrounds\BG_05.jpg")
                    .Copy(backgroundRectangle),
                assetCatalog.GetCompositeImage(@"Images\ALL\Game\backgrounds\BG_06.jpg")
                    .Copy(backgroundRectangle),
            };

            _backgroundSearchArea = new Rectangle(338, 264, 104, 68);
        }
Exemplo n.º 3
0
 public TemplateButton(IAutoIt autoIt, ILogger logger, IAssetCatalog assetCatalog, string fileName, Rectangle rectangle)
 {
     _autoIt = autoIt;
     _logger = logger;
     _template = assetCatalog.GetCompositeImage(fileName).Copy(rectangle);
 }
Exemplo n.º 4
0
        public InPuzzleGame(IAutoIt autoIt, IAssetCatalog assetCatalog, ILogger logger, FontLoader fontLoader)
            : base(autoIt,
                assetCatalog,
                logger,
                @"Images\ALL\Game\puzzle_game\PuzzleGame_Background.jpg",
                11, 556, 277, 35,
                0, 550, 320, 50)
        {
            _submit = CreateCoordinateButton(269, 303, 92, 41);
            _back = CreateCoordinateButton(73, 40, 76, 22);

            // Gear spots
            _inactiveGearSpot = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\Gear_NonInteractive.jpg")
                .Copy(new Rectangle(25, 26, 38, 38));

            _largeCopperGearSpot = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\GearSpot_Large_Copper.jpg")
                .Copy(new Rectangle(30, 32, 29, 29));

            _smallCopperGearSpot = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\GearSpot_Small_Copper.jpg")
                .Copy(new Rectangle(34, 37, 20, 19));

            _largeSilverGearSpot = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\GearSpot_Large_Silver.jpg")
                .Copy(new Rectangle(33, 34, 24, 25));

            _smallSilverGearSpot = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\GearSpot_Small_Silver.jpg")
                .Copy(new Rectangle(35, 37, 18, 18));

            _largeGoldGearSpot = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\GearSpot_Large_Gold.jpg")
                .Copy(new Rectangle(34, 37, 23, 22));

            _smallGoldGearSpot = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\GearSpot_Small_Gold.jpg")
                .Copy(new Rectangle(36, 38, 17, 17));

            // Gears
            _largeWildcardGear = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\Gear_Large_Wildcard.jpg")
                .Copy(new Rectangle(30, 33, 28, 25));

            _smallWildcardGear = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\Gear_Small_Wildcard.jpg")
                .Copy(new Rectangle(28, 29, 32, 32));

            _largeCopperGear = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\Gear_Large_Copper.jpg")
                .Copy(new Rectangle(25, 65, 38, 3));

            _smallCopperGear = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\Gear_Small_Copper.jpg")
                .Copy(new Rectangle(27, 32, 5, 32));

            _largeSilverGear = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\Gear_Large_Silver.jpg")
                .Copy(new Rectangle(25, 65, 38, 3));

            _smallSilverGear = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\Gear_Small_Silver.jpg")
                .Copy(new Rectangle(27, 32, 5, 32));

            _largeGoldGear = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\Gear_Large_Gold.jpg")
                .Copy(new Rectangle(25, 65, 38, 3));

            _smallGoldGear = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\Gear_Small_Gold.jpg")
                .Copy(new Rectangle(27, 32, 5, 32));

            // Tools
            _torch = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\PowerUp_Torch_Idle.jpg")
                .Copy(new Rectangle(14, 59, 24, 31));

            _copperPaint = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\PowerUp_Brush_Copper_Idle.jpg")
                .Copy(new Rectangle(13, 51, 19, 32));

            _silverPaint = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\PowerUp_Brush_Silver_Idle.jpg")
                .Copy(new Rectangle(9, 59, 22, 32));

            _goldPaint = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\puzzle_game\PowerUp_Brush_Gold_Idle.jpg")
                .Copy(new Rectangle(6, 48, 28, 25));

            _letterSearchAreaTesseractArea = new Dictionary<Rectangle, Rectangle>
            {
                // top row
                { new Rectangle(29, 370, 76, 82), new Rectangle(55, 398, 25, 27) },
                { new Rectangle(119, 368, 79, 86), new Rectangle(146, 398, 25, 27) },
                { new Rectangle(214, 373, 73, 78), new Rectangle(238, 398, 25, 27) },
                { new Rectangle(301, 373, 75, 77), new Rectangle(326, 398, 25, 27) },
                { new Rectangle(392, 372, 76, 79), new Rectangle(417, 398, 25, 27) },
                { new Rectangle(483, 371, 76, 83), new Rectangle(509, 398, 25, 27) },
                { new Rectangle(577, 375, 73, 76), new Rectangle(600, 398, 25, 27) },
                { new Rectangle(670, 375, 72, 74), new Rectangle(693, 398, 25, 27) },

                // bottom row
                { new Rectangle(33, 465, 72, 73), new Rectangle(56, 486, 25, 27) },
                { new Rectangle(123, 461, 71, 78), new Rectangle(146, 486, 25, 27) },
                { new Rectangle(215, 463, 71, 74), new Rectangle(237, 486, 25, 27) },
                { new Rectangle(300, 463, 74, 73), new Rectangle(325, 486, 25, 27) },
                { new Rectangle(394, 465, 70, 72), new Rectangle(416, 486, 25, 27) },
                { new Rectangle(485, 461, 73, 77), new Rectangle(509, 486, 25, 27) },
                { new Rectangle(576, 462, 73, 75), new Rectangle(600, 486, 25, 27) },
            };

            _gearOne = CreateCoordinateButton(234, 125, 9, 9);
            _gearTwo = CreateCoordinateButton(292, 155, 8, 7);
            _gearThree = CreateCoordinateButton(354, 147, 11, 8);
            _gearFour = CreateCoordinateButton(412, 173, 9, 10);
            _gearFive = CreateCoordinateButton(476, 165, 7, 6);

            _gearSpotOne = new Rectangle(203, 92, 72, 74);
            _gearSpotTwo = new Rectangle(260, 123, 72, 72);
            _gearSpotThree = new Rectangle(322, 114, 73, 72);
            _gearSpotFour = new Rectangle(380, 139, 70, 73);
            _gearSpotFive = new Rectangle(443, 130, 72, 75);

            _torchSpot = new Rectangle(179, 259, 76, 117);
            _paintSpot = new Rectangle(0, 241, 208, 155);

            _trash = new Rectangle(676, 474, 51, 59);
            _trashConfirm = CreateCoordinateButton(524, 266, 98, 23);

            _gearFont = fontLoader.LoadFont(@"PG_GearLtr_Large23");
        }
Exemplo n.º 5
0
        public InBonusGame(IAutoIt autoIt, IAssetCatalog assetCatalog, ILogger logger)
            : base(autoIt,
                assetCatalog,
                logger,
                @"Images\ALL\Game\bonus_game\BG_Background.jpg",
                266, 372, 74, 38,
                256, 363, 95, 56)
        {
            var one = new List<TemplateCoordinate>
            {
                new TemplateCoordinate(520, 17, 23, 24),
                new TemplateCoordinate(562, 23, 23, 24),
                new TemplateCoordinate(602, 29, 23, 24)
            };

            var two = new List<TemplateCoordinate>
            {
                new TemplateCoordinate(328, 170, 23, 24),
                new TemplateCoordinate(367, 164, 23, 24),
                new TemplateCoordinate(414, 158, 23, 24),
                new TemplateCoordinate(457, 152, 23, 24)
            };

            var three = new List<TemplateCoordinate>
            {
                new TemplateCoordinate(500, 277, 23, 24),
                new TemplateCoordinate(543, 283, 23, 24),
                new TemplateCoordinate(581, 288, 23, 24), // TODO: double check this area
                new TemplateCoordinate(623, 295, 23, 24)
            };

            var four = new List<TemplateCoordinate>
            {
                new TemplateCoordinate(288, 440, 23, 24),
                new TemplateCoordinate(330, 434, 23, 24),
                new TemplateCoordinate(372, 428, 23, 24),
                new TemplateCoordinate(414, 422, 23, 24),
                new TemplateCoordinate(457, 416, 23, 24),
            };

            var five = new List<TemplateCoordinate>
            {
                new TemplateCoordinate(24, 430, 23, 24),
                new TemplateCoordinate(65, 430, 23, 24),
                new TemplateCoordinate(106, 430, 23, 24),
                new TemplateCoordinate(145, 430, 23, 24),
                new TemplateCoordinate(187, 430, 23, 24),
                new TemplateCoordinate(227, 430, 23, 24)
            };

            var rightTemplate = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\bonus_game\BG_LetterTile_Angle_Right_Up.jpg")
                .Copy(new Rectangle(6, 10, 34, 32));

            var leftTemplate = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\bonus_game\BG_LetterTile_Angle_Left_Up.jpg")
                .Copy(new Rectangle(10, 8, 34, 32));

            var straightTemplate = assetCatalog
                .GetCompositeImage(@"Images\ALL\Game\bonus_game\BG_LetterTile_Angle_Straight_Up.jpg")
                .Copy(new Rectangle(7, 8, 34, 34));

            var bonusOne = new TemplateSearchArea(leftTemplate, new Rectangle(499, 8, 153, 61));
            var bonusTwo = new TemplateSearchArea(rightTemplate, new Rectangle(311, 144, 190, 69));
            var bonusThree = new TemplateSearchArea(leftTemplate, new Rectangle(478, 265, 198, 77));
            var bonusFour = new TemplateSearchArea(rightTemplate, new Rectangle(273, 412, 230, 81));
            var bonusFive = new TemplateSearchArea(straightTemplate, new Rectangle(10, 419, 252, 45));

            _letterGroups.Add(new KeyValuePair<TemplateSearchArea,List<TemplateCoordinate>>(bonusOne, one));
            _letterGroups.Add(new KeyValuePair<TemplateSearchArea,List<TemplateCoordinate>>(bonusTwo, two));
            _letterGroups.Add(new KeyValuePair<TemplateSearchArea,List<TemplateCoordinate>>(bonusThree, three));
            _letterGroups.Add(new KeyValuePair<TemplateSearchArea,List<TemplateCoordinate>>(bonusFour, four));
            _letterGroups.Add(new KeyValuePair<TemplateSearchArea,List<TemplateCoordinate>>(bonusFive, five));
        }