You’re not drawing a circle, as far as I can tell.
This line:
timer.performWithDelay (10, drawExplosion(event.x, event.y) )
does not call drawExplosion and pass it any values. If you want to do what I think you want to do, you need to wrap the call to drawExplosion in a function because using a timer to call a function cannot pass parameters. Try replacing the line above with this:
timer.performWithDelay (10, function() drawExplosion(event.x, event.y) end)
That basically creates an anonymous function which gets called by the timer. The anonymous function can then execute as much code as it likes.
Once you’ve done this, you’ll see that the parameters being passed into the setExplosion function are valid, which allow the circle to be drawn. If the circle is never drawn, because the parameters to newCircle are invalid (in your case, nil) then calling :removeSelf() on the circle will not be possible.
