O'Reilly logo

Corona SDK Mobile Game Development by Michelle M. Fernandez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – adding an options menu

We'll be adding an options menu that can be accessed through the main menu. We're going to add a new UI button called Credits, which will direct the user to the credits screen once it is pressed.

  1. Create a new file called options.lua and import Storyboard and UI modules, thestoryboard.newScene() function, and the variables for timer and audio.
    local storyboard = require( "storyboard" )
    local scene = storyboard.newScene()
    
    local ui = require("ui")
    
    local btnAnim
    
    local btnSound = audio.loadSound( "btnSound.wav" )
  2. Create the createScene() event. Add in, storyboard.removeScene( "mainmenu" ), which will remove the "mainmenu" scene. This will occur after the player has transitioned from the main menu screen and is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required