I got it so my director resets but now it leaves the game running and the reset button still there and does nothing
local resetButton = display.newImage("image/reset.png")
resetButton.x = 300
resetButton.y = 512
resetButton.isVisible = false
resetButton.alpha = 0
resetButton.scene = "loadgame"
local onCollision = function (self, event)
if event.phase == "ended" then
if event.other.name == "spikes" then
resetButton.isVisible = true
transition.to(resetButton, {time=500, alpha = 1})
self:removeSelf()
self = nil
end
end
end
function changeScene(e)
if(e.phase == "ended") then
director:changeScene(e.target.scene)
end
end
resetButton:addEventListener("touch", changeScene)
so how would I fix this [import]uid: 55737 topic_id: 10053 reply_id: 310053[/import]
[import]uid: 12482 topic_id: 10053 reply_id: 36748[/import]