It's impossible to know how you'll react in such a situation.
A few years ago, a couple of car thieves shot at me while I was walking my dog late at night. They had just been breaking into a car a block over from me. They owner came outside, and one thief fired a few shots, hitting him in the leg.
I heard the shots, and knew right away that it wasn't fireworks. I am a gun owner and very experienced with firearms. Still, it was difficult to even know where the shots were coming from. There was no cover nearby. And I wasn't sure of what I should do. Just kinda froze up.
Then the duo ran through some yards, and emerged through some bushes about 50-75 yards ahead of me. The one guy just started shooting at me. It was surreal. I started off in the opposite direction, hearing rounds hitting the ground behind me. But it wasn't until the next day when it really began to sink in.