Okay this is what I did .
In my main.lua file I put what was in the example’s main.lua file :
local example1 = require "example1" local group = display.newGroup() example1.create( group ) timer.performWithDelay( 4000, function() example1.start() end ) timer.performWithDelay( 8000, function() example1.stop() end ) timer.performWithDelay( 12000, function() example1.destroy() end )
and in my example1.lua file I put what was in the example’s game.lua file :
local physics = require "physics" local cx, cy = display.contentCenterX, display.contentCenterY local fullw, fullh = display.actualContentWidth, display.actualContentHeight local isRunning = false local layers local game = {} function game.create( group ) game.destroy() layers = display.newGroup() layers.underlay = display.newGroup() layers.content = display.newGroup() layers.overlay = display.newGroup() -- group:insert( layers ) -- This group contains all layers layers:insert( layers.underlay ) -- Bottom layer. layers:insert( layers.content ) -- Middle layer layers:insert( layers.overlay ) -- Top layer end etc...
When I did that I got nothing . Nothing should up on the simulator or in the console . I’m guessing everything went well .
When I did this in my main.lua file :
local example1 = require "example1" -- or whatever you named the module file. example1.create( display.currentStage ) timer.performWithDelay( 1000, example1.destroy ) -- If this doesn't crash you're ready for the next test.
and I left the game file the same, I don’t have any problems . Should I move on or should I be seeing something on my screen ?