remove all spawned coins
问题 What is the best way to remove all spawned coins when the game is over? Here is the code that spawns the coins: screenGroup = self.view coin = {} coinspawn = function() i = display.newSprite( imageSheet1, sequenceData1 ) i.x = display.contentWidth i.y = math.random(0, display.contentHeight-50) i:play() i.collided = true i.name = "coin" physics.addBody(i, "dynamic", {density=.1, bounce=0.1, friction=.2, shape= shape2 ,filter=playerCollisionFilter } ) --player.gravityScale = 0.5 coinIntro =