Book Image

Corona SDK Mobile Game Development: Beginner's Guide

By : Michelle M Fernandez
Book Image

Corona SDK Mobile Game Development: Beginner's Guide

By: Michelle M Fernandez

Overview of this book

Table of Contents (19 chapters)
Corona SDK Mobile Game Development Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – altering the game file


We will rename our current main.lua file to maingame.lua and add some additional lines to our game code. Be sure to change the file name within your Egg Drop project folder. To rename the file follow these steps:

  1. Remove the following lines near the top of the code. We'll hide the status bar in another scene that we'll create later on in this chapter. The gameGroup display group will be altered to fit within the Composer parameters:

    display.setStatusBar( display.HiddenStatusBar )
    local gameGroup = display.newGroup()
  2. At the very top of the code, implement Composer by adding local composer = require( "composer" ) and local scene = composer.newScene() so that we can call the scene events:

    local composer = require( "composer" )
    local scene = composer.newScene()
  3. After local loadValue = function( strFilename ), add in the create() event. We will also add back in our gameGroup display group, but under the scene's view property. Also, add in composer.removeScene...