How to make shooting mechanic that shoot in 4 direction like cave story

If you play cave story you really know what I am talking about. If don’t I want that my player shoot when he is on ground front and up side when he is in air he can shoot down side another thing I went that my player not need to shoot in being when he get the item like in cave story then he need to shoot

Not very clear, I’m afraid.
If you want to shoot directionally, use a main condition ‘fire button is pressed’, and 4 sub-conditions ‘left/down/up/right arrow is pressed’ to decide the angle of the shot.