Ejemplo n.º 1
0
        public static int AllyCreepHealth()
        {
            //Get matching x pixels of the health bar
            int value = ImageRecognition.MatchingXPixels("Game/allycreephealth.png", 3);

            //Get total pixels of health bar
            int total = PixelCache.GetWidth("Game/allycreephealth.png");

            //Get percentage of 100
            return((int)Math.Round(100d * value / total));
        }
Ejemplo n.º 2
0
        //Return health value percentage
        public static int Mana()
        {
            //Get matching x pixels of the health bar
            int value = ImageRecognition.MatchingXPixels("Game/mana.png", 40);

            //Get total pixels of health bar
            int total = PixelCache.GetWidth("Game/mana.png");

            //Get percentage of 100
            return((int)Math.Round((double)(100 * value) / total));
        }