To be legally entitled to shoot, you must feel you are in IMMINENT danger of loss of life or grave bodily injury.
There are three criteria to be filled for this to be true.
The attacker must have:
1. Ability - Is he physically and mentally capable of carrying out his stated or assumed actions?
2. Opportunity - Is he close enough to carry out his stated or assumed actions?
3. Intent - Is he advancing in a threatening manner?
If all three of these are satisfied, shoot. Shoot until the threat is negated, then shop shooting.
For example: Man 30 feet away, advancing with a raised baseball bat in hand.
Draw your weapon. Aim. "Stop or I'll shoot!"
If the individual stops or turns back, reholster your weapon. Continue to observe.
If he continues to advance, shoot until he stops advancing.
For example: Man standing still 30 feet away with a baseball held down by his leg - NOT an imminent threat. In this case, you may not be legal to even draw your weapon. In some states, drawing your weapon is "use of deadly force". It can also be "brandishing" and/or a "menacing threat" or "assault".