public static int Mana() { int value = Recognition.MatchingXPixels("Game/mana.png", 40); int total = Pixels.GetWidth("Game/mana.png"); return((int)Math.Round((double)(100 * value) / total)); }
public static int Health() { int value = Recognition.MatchingXPixels("Game/health.png", 40); int total = Pixels.GetWidth("Game/health.png"); return((int)Math.Round(100d * value / total)); }