Getting two barrels to fire alternately

I have a simple turret with two barrels, each able to instantiate and shoot a projectile. But I would like them to shoot alternately, like the old WW2 anti-air guns, rather than both shooting at once. Here is the script I have applied to both barrels:

 public Rigidbody bullet;
    	public float power = 1500f;
    	public float ShootTimer = 0.01f;
    	public float nextFire = 0.0f;
    	
    
    	
    		
    		//Shooter script
    	if(Input.GetButton("Fire1")&& Time.time > nextFire){
    			nextFire = Time.time + ShootTimer;
    			Rigidbody instance = Instantiate(bullet, transform.position, transform.rotation) as Rigidbody;
    			Vector3 upwards = transform.TransformDirection(Vector3.up);
    			instance.AddForce(upwards * power);
    		}
    	
    	}
    }

Tweaking my Shoot Timer and Next Fire variables doesn’t really give me satisfactory results. They may alternate for a few seconds but then for some reason it appears as if they both start to shoot faster. Also letting go of the fire button and pressing it again will cause them to start firing again at the same time. Am I missing some other variables?

Hi, create a bool and use true as left barrel shot, and false as right barrel shot. You should save each barrel separately so you could move them without touching the other one.

bool shootSequence;

void Start(){
   shootSequence = false; //will start to shoot with right barrel, or set it as you wish
}

//if ready to shoot
if(shootSequence){ //is true
   //shoot move/shoot left barrel
   shootSequence !=shootSequence; //change bool
}

else{ //is false
   //shoot move/shoot right barrel
   shootSequence !=shootSequence; //change bool
}