how would i fix my firing script to work for mobile devices

here is my script…im pretty new to writing code just so you knew …i do know i need to change my “fire1”…but what would i change it to

public float timeBetweenBullets = 0.15f;
public GameObject projectile;

//bullet info
public Slider playerAmmoSlider;
public int maxRounds;
public int startingRounds;
int remainingRounds;

float nextBullet;

//graphic info
public Sprite weaponSprite;
public Image weaponImage;

// Use this for initialization
void Awake () {
	nextBullet = 0f;
	remainingRounds = startingRounds;
	playerAmmoSlider.maxValue = maxRounds;
	playerAmmoSlider.value = remainingRounds;

}

// Update is called once per frame
 void Update () {
	playerController myPlayer = transform.root.GetComponent<playerController> ();

	if (Input.GetAxisRaw ("Fire 1") > 0 && nextBullet < Time.time && remainingRounds>0) {
		nextBullet = Time.time + timeBetweenBullets;
		Vector3 rot;
		if (myPlayer.GetFacing () == -1f){
			rot = new Vector3 (0, -90, 0);
	} else rot = new Vector3 (0, 90, 0);

	Instantiate (projectile, transform.position, Quaternion.Euler (rot));

		remainingRounds -=0;
		playerAmmoSlider.value = remainingRounds;
	}
}

public void reload(){
	remainingRounds = maxRounds;
	playerAmmoSlider.value = remainingRounds;
}

public void initializeWeapon(){
	nextBullet = 0;
	playerAmmoSlider.maxValue = maxRounds;
	playerAmmoSlider.value = remainingRounds;

}

hi;
u wrote a script that in update method check for player input;
but for mobile u have to move all of your firing code to a seperate function ( not update) and the u have to learn touch input in unity then create a button and when it has been touched u call the function for firing ;
thats all not too much hard maybe a week or less to achive all of it ;

thank you for answering my post…i actually do know that it needs to be a separate function because i was able to do it for my jump action. i,m following a tutorial that is not made for mobile but i would like to play on my phone. whenever i try making it a separate function it stops working for me. How would i write my update so the function works. i saw an example of what i should do but it didn’t work when i tried it.

function Update(){
if(Input.GetAxis (“shoot”))
GoTriggerHappy();
}

function GoTriggerHappy(){
//All events for shooting goes here
}

i dont really get it…but like i said im very new to script