I'm working on a game where you control a large army, but most of the actions of the player controlled units are automated. I'm having some trouble with my healer class. How can I scan around the healer unit for friendly units that are wounded, so I can ignore or heal the unit accordingly?
Right now Each unit has a bool value called "Wounded" that's switched on when their health is below maximum. The healer currently checks every friendly unit one at a time (they are stored in an array) and checks their "Wounded" value. It works, but it seems very heavy. This seems like an unruly way to go about it, especially when there is a large army with multiple healers.
Is there a more efficient way of doing this?