Optimized the shooting algorithm to trigger one bullet per key press.