Had this idea at work, just mocked it up and it seems to work so far, I'm using containers for the two pieces and the enemy is just a platform movement and the solid ground is a tilemap:
Sorry, the gif is too wide to display properly: https://s28.postimg.org/vqpowx6ot/stev.gif
and: https://s27.postimg.org/fw3fosfv7/stevex.jpg
Develop games in your browser. Powerful, performant & highly capable.
Detecting platform edges? Its far more elegant to place an collision object at the ends of a platform. Then you can run checks for multiple enemies using just those 2 objects instead of attaching 2 to each one.
Yeah, but this is quite cool if you don't want to do that for every edge, unless there's a big downside to using this method (other than two detectors per enemy)?
EDIT: I just make a container and they create properly for every instance on an enemy, so you just set your enemy and the game takes care of the rest. I don't understand why this wouldn't be the more elegant approach?