How would I do this using this local collision code
local function goalCollision(event) local phase = event.phase local target = event.target local other = event.other if phase == "began" then if other.collisionType == "eggplant" then composer.gotoScene("chooselevel") end end end goal:addEventListener("collision", goalCollision)
Rather than composer going to the scene “chooselevel”, could I make it remove an object?
