Statements in the Update () function are called in each frame that the scene is running. In our function, we are listening for input from the Player. If the Player clicks the left mouse button, or presses the A or X buttons on the Touch controller, the Shoot () function will run. Keep in mind that interaction with a button can have three stages. First, the Touch controller has sensors which detect when fingers are near a button. Second, a button can be pressed. Third, a button can be released. In each of these cases, we can trigger an event to coincide with player interaction.
So, the GetButtonDown call will be true for the Update frame while the button is being pressed. It will revert to false at the start of the next frame.