2D character Animation-controller

Hi i´m doing a TopDown Zelda like game, but there is a “Problem” in the Atk Animation of the player, Every time i press the atk Button in idle always be atk at the same direction (down) I see a video of to fix this but is for a Walk Animation, I dont know how to do it for the atk, if someone can help i will be very appreciate

You need an animation for each direction. Then play the correct directions attack animation.