You killed someone because they were armed, however, they were not a threat to you until you pulled your gun and started shooting them.
Just because you are trying to mug people, it does not change the circumstance that you can shoot people.
You had three choices in this scenario;
A) See he...