I googled what I am curious about, and didn't find anything yet.
I have my character (0, 0, 0) and enemy units are generated at random position.
And I will automatically move my character by press auto button.
While moving, begin attacking enemies if an enemy is within a certain range from my character.
Should I have all enemies list in a generic list when they are generated?
and I keep calculating the distance between my character and enemies?
I thought my character just rays around 360 degree then attacks the enemy found from the ray.
but i guess there's better way to do it.
Any ideas?