Hello! I’m new to Unity. So far, developing with it has been fun. There is just this one problem I can’t figure out.
My game has bombs. I would like to be able to loop through their instances to access their information. There can be multiple exploding bombs on the screen, and from an enemy script, I would like to loop through each bomb instance and check, say, its position.
I couldn’t figure out the commands to use in the scripting manual. Any help would be appreciated.
My current solution is a global array which stores the bomb info. Each bomb writes its current status to this array. It works, but I bet there is a better way.