This might help you As long as you drag the mouse you manually invoke the playerShoot(e) method from the mouseDragged() method.. However, your mouseDragged() method sets your buttonPressed variable to false so as soon as you stop dragging your main loop stops.
how to know if mouse dragged left or right inside jpanel in java
it helps some times A solution specific to Processing would be to create the variable that stores whether the user dragged the mouse or not. Under mouseDragged(), the variable is set to true. Inside the draw() function, if the mouse is not pressed, the variable is set to false. Example: