-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfactura.lua
More file actions
65 lines (40 loc) · 1.85 KB
/
factura.lua
File metadata and controls
65 lines (40 loc) · 1.85 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
local scene = composer.newScene()
-- Called when the scene's view does not exist:
function scene:create( event )
local group = self.view
local background = display.newImage( group, "images/madera.jpeg")
background:translate( centerX, centerY )
local btn = display.newImage( group, "images/novalido.png" )
btn:translate( centerX, centerY )
end
-- Called immediately after scene has moved onscreen:
function scene:show( event )
-- INSERT code here (e.g. start timers, load audio, start listeners, etc.)
local group = self.view
end
-- Called when scene is about to move offscreen:
function scene:hide( event )
local group = self.view
collectgarbage()
composer.removeScene( composer.getSceneName( "current" ) )
--Runtime:removeEventListener("enterFrame", update)
-- INSERT code here (e.g. stop timers, remove listeners, unload sounds, etc.)
-- Remove listeners attached to the Runtime, timers, transitions, audio tracks
end
-- Called prior to the removal of scene's "view" (display group)
function scene:destroy( event )
local group = self.view
collectgarbage()
-- INSERT code here (e.g. remove listeners, widgets, save state, etc.)
-- Remove listeners attached to the Runtime, timers, transitions, audio tracks
end
---------------------------------------------------------------------------------
-- END OF YOUR IMPLEMENTATION
---------------------------------------------------------------------------------
-- Listener setup
scene:addEventListener( "create", scene )
scene:addEventListener( "show", scene )
scene:addEventListener( "hide", scene )
scene:addEventListener( "destroy", scene )
---------------------------------------------------------------------------------
return scene---------------------------------------------------------