title: Loop Delay Timeout Issue
body: <p>I'm working on a HTML5 game, and currently trying to make a weapon that fires 3 projectiles a few seconds after each other. So basically, a 3 burst assault rifle.</p>
  
  <p>I first did:</p>
  
  <pre><code>for(var i = 0; i &lt; 3; i++){
     player.bullets.push(bulletInstance);
  }
  player.shotBullet = true;
  </code></pre>
  
  <p>which worked, but of course, the projectiles where release at the same time, meaning there was no delay between each shot. So I tried to introduce a setTimeout function:</p>
  
  <pre><code>setTimeout(function (){
      i++;
      if(i &lt; 3){
          var b = new Rectangle( player.x + (player.width / 2) - 4, player.y + (player.height / 2) - 4, 8, 8);
  
          player.bullets.push(bulletInstance);
      }
  }, 1000)
  player.shotBullet = true;
  </code></pre>
  
  <p>This doesn't do the trick either. Could someone point out my problem here?</p>