How do I make a UI Button a click?

So at the moment when I press fire it carries on firing. I want it so it only fires once and to fire again I would have to press the button again. I have searched for hours and tried various things and also watched many a video but still haven’t a clue. Hopefully its something simple. I have this code attached to an Event Trigger. I keep stumbling across this info but haven’t a clue what to do with it! Arrgghh. Thanks in advance!

using UnityEngine;
using System.Collections;

public class shoot : MonoBehaviour {

	public GameObject spaceship;
	private MobileShip1Squash MobileShip1Squash;
	// Use this for initialization
	void Start () {
		MobileShip1Squash = spaceship.GetComponent<MobileShip1Squash>();
	}
	// Update is called once per frame
	public void Shoot () {
		MobileShip1Squash.shootnumber = 1;
	}
	public void noShoot () {
		MobileShip1Squash.shootnumber = 0;
	}
}
  1. Write a script and a public function you like to call on fire.
  2. Attach the script to any gameobject.
  3. Click on the button and go to On Click().
  4. Click on +
  5. Drag n Drop the gameobject, where the script is attached.
  6. Select the function from the drop down list.
  7. Youre Done with, Button click now.

If you want to keep some time interval in between, use StartCouroutine and IEnumerator.
Or you can disable the button for particular time, use ButtonObject.Interactable = false;

I did manage it in the end by having a pointer down and then telling the ship script it had fired. Thanks for the replies.