We'll be placing loading screens when the application launches and before the game level starts. This tells the user that more content or information is on its way.
Create a new file called
loadmainmenu.lua
in your project folder.Import Storyboard and add in the
storyboard.newScene()
function.local storyboard = require( "storyboard" ) local scene = storyboard.newScene()
Create two local variables called
myTimer
andloadingImage
. Add in thecreateScene()
event and ascreenGroup
display group.local myTimer local loadingImage -- Called when the scene's view does not exist: function scene:createScene( event ) local screenGroup = self.view print( "\nloadmainmenu: createScene event" ) end
Create the
enterScene()
event and add in ascreenGroup
display group.-- Called immediately after scene has moved onscreen: function scene:enterScene( event ) local screenGroup = self.view print( "loadmainmenu: enterScene event" )
Introduce the
loadingImage...