Sha256: caf662ac20634aba08bbedfb298323f44e45b31445b6b5c9648f4faf7ac749c2

Contents?: true

Size: 879 Bytes

Versions: 4

Compression:

Stored size: 879 Bytes

Contents

module(..., package.seeall)

-- Main function - MUST return a display.newGroup()
function new()
  local localGroup = display.newGroup()

  -- Background
  local background = display.newImageRect("bk_default.png", 480, 320)
  background.x = display.contentCenterX
  background.y = display.contentCenterY
  localGroup:insert(background)

  -- Title
  local title = display.newText("Touch to go back", 0, 0, native.systemFontBold, 16)
  title:setTextColor( 255,255,255)
  title.x = display.contentCenterX
  title.y = display.contentCenterY
  title.name = "title"
  localGroup:insert(title)

  -- Touch to go back
  local function touched ( event )
    if ("ended" == event.phase) then
      director:changeScene("menu","fade")
    end
  end
  background:addEventListener("touch",touched)

  unloadMe = function()
  end

  -- MUST return a display.newGroup()
  return localGroup
end

Version data entries

4 entries across 1 versions & 1 rubygems

Version Path
nakor-0.0.2 lib/nakor/generators/corona-game-template/about.lua
nakor-0.0.2 lib/nakor/generators/corona-game-template/help.lua
nakor-0.0.2 lib/nakor/generators/corona-game-template/play.lua
nakor-0.0.2 lib/nakor/generators/corona-game-template/settings.lua