Check out example codes for "unity left mouse button". It will help you in understanding the concepts better.
Code Example 1
//Key Code in the Input Project Settings is "mouse 0" Input.GetKey(KeyCode.Mouse0))
Code Example 2
if (Input.GetMouseButtonDown(1)) //This is too stop spaming the gun
Learn ReactJs, React Native from akashmittal.com