The thing is: I don’t know what your 2D Game is. Are you just firing straight to the left and right or can your player aim with the mouse? Or does he aim with the arrow keys in 8 different directions?
To give you the answer to your question, i would need to know this.
I will just answer as if you would only shoot lift and right.
Let’s say your Character moves along the X-Axis.
You left is negativ X and right is positiv X.
Now you would check if the forward vektor of your character is positiv or negativ. But only the X of that vector. If it’s positiv, you would shoot in (1, 0, 0).
Is it negativ you shoot in (-1, 0, 0). (X, Y, Z) seen as a direction vektor.
Is this what you have done or at least similar? Than it’s ok i guess.
I always say: If it works, why not using it? (: