Hello all, I'm creating a sidescrolling brawler & I have run into a problem that I can't figure out. I'm hoping one of you may have the answer.
This is how I change z-index based on hero/enemy
Does anyone know how to do this with several enemy instances of the same type? If the enemies are randomly walking around how do I differentiate between them and have them change z-index based on those closest to the bottom of the screen without knowing beforehand how many enemies I may have on the screen at any one time?
Thank you for your time.