In almost any threatening situation, your first thought should be "Move!".
If within contact distance, move INTO the threat (offline) and strike.
If within Tueller distance, move off the line of attack and present arms.
If outside that distance, move to retreat or cover.
After you are moving, you can think about what next.