hi… im trying to use overlay in my app but im kinda getting a slight confusion here…
so here is part of my code
[spoiler]
--prototype.lua local storyboard = require( "storyboard" ) local scene = storyboard.newScene() --[omitted some lines] local function isFinish() print("game over") storyboard.showOverlay( "scripts.gameOverFinish", options) end function scene:createScene( event ) --[lineOfCodes here] end function scene:overlayBegan( event ) local group = self.view local overlay\_name = gameOverFinish print("entered overlay scene: prototype") --[lineOfCodes here] end
[/spoiler]
[spoiler]
--gameOverFinish.lua local storyboard = require( "storyboard" ) local scene = storyboard.newScene() function scene:overlayBegan( event ) local group = self.view local overlay\_name = gameOverFinish -- name of the overlay scene print("entered overlay scene: overlay") end
[/spoiler]
the thing that bothers me here is that,… the display is
“entered overlay scene: prototype”
[so the gameOverFinish.lua is never used]
but when i remove that lua file, the computer will look for it. (gameOverFinish.lua)
what should i do so that i can use the separate lua file?
some notes:
my prototype.lua and gameOverFinish.lua are both located in scripts folder
when i delete the overlay part of codes in prototype.lua, it wont do anything