title: Killing all elements in a group(Phaser)
body: <p>I have a <code>clouds</code> group that will spawn two clouds.  Every 10 seconds I want to kill those clouds and spawn two more clouds.  Can you kill all elements of a group at once?  </p>
  
  <pre><code>var clouds;
  var start = new Date();
  var count = 0;
  
  function preload(){
       game.load.image('cloud', 'assets/cloud.png');
  }
  
  function create(){
       clouds = game.add.group();
  }
  
  function update(){
       if(count &lt; 10){
           createCloud();
       }
  }
  
  function createCloud(){
       var elapsed = new Date() - start;
  
       if(elapsed &gt; 10000){
         var locationCount = 0;
         //Here is where I'm pretty sure I need to
         //kill all entities in the cloud group here before I make new clouds
         while(locationCount &lt; 2){
               //for the example let's say I have a random number
               //between 1 and 3 stored in randomNumber
               placeCloud(randomNumber);
               locationCount++;
               count++;
          }
       }
  }
  
  
  function placeCloud(location){
       if(location == 1){
           var cloud = clouds.create(170.5, 200, 'cloud');
       }else if(location == 2){
           var cloud = clouds.create(511.5, 200, 'cloud');
       }else{
           var cloud = clouds.create(852.5, 200, 'cloud');
       }
  }
  </code></pre>