If you just have a single sprite for each for the eight directions you can simply store them in one animation with frame 0 pointing right.
Do some math to take the angle of the player 0-360 and remap it to 0-7, rounded to the nearest whole number. That would be the index to set the frame to. Otherwise, if you have whole animations for each direction, you are going to have to get the heading angle, do the same math, then have some conditionals to set the animation.