2D TopDown: idle always faces right when stop moving

In my example I used print strings to since I dont have paperflip books to see if this in fact works, but with the print strings it did seem to work. So in your game, you of course would switch out the print strings to your animations.

Testing this, lets say you are pressing UP, and holding UP, while holding UP, you press the RIGHT arrow, now your are holding both UP and RIGHT. Since Right was the second key pressed, the RIGHT enum would be set. Should you release the RIGHT key, the enum would switch back to the UP enum.

Now still holding UP, press the LEFT key. Hold both keys, the LEFT enum is set, since it was the second key pressed. releasing the LEFT key, and still pressing UP, the enum goes back to UP. Now should you press and hold UP, AND press and hold Left, then release UP, the Left Enum would be set.

In any case, which ever is the last key to be pressed will set the enum to that enums direction.

Now that the enum is set, should you be pressing a key, the MovingAnim bool is set to true, which would set the switch on Movement Enum to that directions moving animation. When you release the key, MovingAnim bool goes false and the Switch for that sets the direction for what would be your idle animations.

Eh… I hope I helped, and I cross my fingers that what I suggest even works. lol. But like I said It seemed to do what I think you are looking for when I tested it out.

~