title: Delete a self object of a function [corona sdk]
body: <p>I have a little problem and I'm searching for an easy solution,
  <br>
  in my game, if a bullet touches a specific ennemy, this target should be deleted and respawn otherwhere,
  <br>
  I'm using the self-collision event to make the instructions single to each ennemy, 
  <br>
  the problem is that self-collision function only works if he recognise the target, but as I delete it the first time in my collision function, that ennemy doesn't exist anymore for my function. It works only the first time.
  <br>
  I hope that my problem is understandable,
  <br>
  <br>
  here is an example of the code:</p>
  
  <pre><code>local ennemy
  ennemy = display.newRect(0,0, 20, 50)
  transition.to( ennemy, {time = 2000, x = 240, y = 160} )
  
  local function onCollision(self,event)
      display.remove( bullet )
      display.remove( ennemy )
  
      ennemy = display.newRect(0,0, 20, 50)
      transition.to( ennemy, {time = 2000, x = 240, y = 160} )
  end
  
  ennemy.collision = onCollision
  ennemy:addEventListener( "collision", ennemy )
  </code></pre>