Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The credits screen we'll be creating will be based on a touch event that transitions to the previous screen from which it was introduced.
creditsScreen.lua and import Storyboard, the storyboard.newScene() function, and the backgroundImage variable.local storyboard = require( "storyboard" ) local scene = storyboard.newScene() local backgroundImage
createScene() event. Add in the line, storyboard.removeScene( "options" ), which will remove the "options" scene. This will occur after the player has transitioned from the options screen and is sent to the credits screen.-- Called when the scene's view does not exist: function scene:createScene( event ) local screenGroup = self.view -- completely remove options storyboard.removeScene( "options" ) print( "\ncreditsScreen: createScene event" ) end