-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.lua
More file actions
29 lines (22 loc) · 936 Bytes
/
main.lua
File metadata and controls
29 lines (22 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
composer = require( "composer" )
gameState = require("gameState")
display.setStatusBar( display.HiddenStatusBar )
system.setIdleTimer( false ) -- para no apagar la pantalla
centerX = display.contentWidth/2
centerY = display.contentHeight/2
composer.gotoScene ( "menu", { effect = "fade"} )
------HANDLE SYSTEM EVENTS------
function systemEvents(event)
print("systemEvent " .. event.type)
if ( event.type == "applicationSuspend" ) then
print( "suspending..........................." )
elseif ( event.type == "applicationResume" ) then
print( "resuming............................." )
elseif ( event.type == "applicationExit" ) then
print( "exiting.............................." )
elseif ( event.type == "applicationStart" ) then
print( "starting.............................." )
end
return true
end
Runtime:addEventListener( "system", systemEvents )