I'm using a mechanism to change the animations based on direction for my sprites. I'd like to use the same logic for all my NPC animations, and ideally all animations in general.
NPCs work great, when there is only one on the screen. But, when there is two and they move in different directions, everything gets weird.
Here is what I have so far.