local composer = require ("composer")
local scene = composer.newScene()

local mainGroup

local tmr

function scene:create( event )
    local mainGroup = self.view

    local sleepyBug = display.newImageRect( "assets/logo.png", 900 * 0.75, 285 * 0.75 )
    sleepyBug.x = display.contentCenterX
    sleepyBug.y = display.contentCenterY
    mainGroup:insert(sleepyBug)
end

function scene:show( event )
    local phase = event.phase

    if ( phase == "will" ) then

    elseif ( phase == "did" ) then
        tmr = timer.performWithDelay( 2000, function () composer.gotoScene( "gameIntro", "crossFade", 1500 ) end, 1 )
    end
end

function scene:hide( event )
    local phase = event.phase

    if ( phase == "will" ) then

    elseif ( phase == "did" ) then

    end
end

function scene:destroy( event )

end

-- Listener setup
scene:addEventListener( "create", scene )
scene:addEventListener( "show", scene )
scene:addEventListener( "hide", scene )
scene:addEventListener( "destroy", scene )

return scene