Hey all,
I have the following code in my lua file, which defines the gameOver function I am calling later in the script.
function gameOver()
gameOverText = display.newText("Game Over", 50, 240, native.systemFontBold, 40)
local function removeGOText()
gameOverText:removeSelf()
end
timer.performWithDelay(2000, removeGOText)
player:removePlayer()
Runtime:removeEventListener("enterFrame", runtimeListener)
Runtime:removeEventListener("accelerometer", accelerometerCall)
Runtime:removeEventListener("touch", touchListener)
loader:removeAllSprites()
localGroup = nil
timer.performWithDelay(2000, startOver)
end
gameOverText = display.newText fires just fine and displays the text when the player dies.
local function removeGOText and everything below it does NOT fire and I don’t know why. The gameOver text just remains on the screen and the startOver function never works.
Any ideas?
[import]uid: 125387 topic_id: 22833 reply_id: 322833[/import]
Will keep playing with it to see if I can get this fixed. [import]uid: 125387 topic_id: 22833 reply_id: 91288[/import]