I've got a platformer level, and I have multiple enemies on the level. What I'd like to do is when I press the letter D, it will toggle a debug mode, where next to each enemy will be a block of text showing some basic stats would show up.
How would I go about setting up these blocks of text so they'd be pertinent for the enemy it's attached to (if that's even the correct terminology).
I imagine I'd have to have a text object, and on the startup of the layout, loop through these enemy instances, create a new instance of the text block next to each enemy. But how do I ensure the block of text contains the values for the specific enemy?