title: Add entities to a world conditionally in Actionscript 3
body: <p>I'm very new to actionscript 3, and only learned rudimentary coding through YouTube. Regardless, I'm using FlashPunk to alleviate pain, and it seems to have useful tools.</p>
  
  <p>In my Level, which extends the World class, the constructor adds two entities: the Player and the Enemy, which then play around and do things. I want to be able to add additional instances of the Enemy entity, or perhaps remove and re-add the player (so as to reset health and position) with a key input. If I try the following in Main.as</p>
  
  <pre><code>Input.define("Reset", Key.R);
  </code></pre>
  
  <p>followed by the following in Level.as </p>
  
  <pre><code>    public function Level() 
      {
          if (Input.pressed("Reset"))
          {
              add(new Enemy());
              add(new Player());
          }
      }
  </code></pre>
  
  <p>a whole lot of nothing happens, when intuitively I think it should work. Am I missing something when it comes to generating instances of an Entity?</p>