How to update animation based on moviment direction?

Hi everyone, i’m working with paper 2D and i need to update the animation based on direction, if the the character is moving up, i need to set up running animation, if left the left running animation and goes on… i don’t know how to get this moviment direction to do it, help please!