For my state (relevant portion bolded):
Unarmed or armed isn't part of the equation, only if the force is necessary to terminate the entry/attack. You are under no legal obligation to go hands on first.(d) A person:
(1) is justified in using reasonable force, including deadly force, against any other person; and
(2) does not have a duty to retreat;
if the person reasonably believes that the force is necessary to prevent or terminate the other person's unlawful entry of or attack on the person's dwelling, curtilage, or occupied motor vehicle.
Outside the home/car you're going to have a bit less protection. If they are trying to rob you of your firearm, you have a forcible felony you can prevent with deadly force. If they are just silently jogging/drunkenly stumbling in your direction you better have something else to hang your hat on.