I was watching tutorials on Tower Defense games, and I was wondering if I could use a Gizmo.DrawWireSphere for a Turret, where whenever an enemy walks into the circumference, the enemy becomes a target.
To make it more interesting, I wanted the array to be only up to 3 targets, so an index of 2. If there is only one enemy in the circumference, it will only fire at the one target, but if more than one, it will also fire at them simultaneously. Once the enemy is out of the circumference, the target becomes null, and
will get the next enemy, if one ever enters.
Per my question: is it possible to do this only using a WireSphere?
I struggle to come up with the logic. could anyone assist me?
thanks in advance!