adding a delay to shooting

I have tried various methods but the if adding a value for the variable burstdelay doesn’t have any effect on slowing down shooting I’m stuck anyone that can help would be appricated.

 if(burstTimer < burstDelay) 
    			{
    				ERayShoot();
    				audio.PlayOneShot(ShootSound);
    				_hit.collider.SendMessageUpwards("ApplyDamage", Damage, SendMessageOptions.DontRequireReceiver);
    				BulletsLeft--;
                	// play the sound or whatever
                	burstTimer = burstDelay;
    			
                	
        	} 
		else 
			{
				
           		burstTimer -= 0.1f;
        	}

Try:

   if(Time.time > ( lastFireTime + burstDelay) )
   {
   lastFireTime=Time.time;
   .......
   }

Setting burstDelay to 0.5 will give you a 1/2 second delay.

var activated:boolean = true;

    function Update()
    {
        if(activated)
        {
            activated = false;
            cour();
        }
    
    }
    
    function cour()
    {
         yield waitDelay()
         activated = true;
    }
    
    function waitDelay()
    {
         yield waitForSeconds (5); //Here it waits 5 seconds.
    }

This is called a coroutine. It delays using functions, since there is no other delay method.