-
Notifications
You must be signed in to change notification settings - Fork 34
/
play.lua
50 lines (35 loc) · 1.49 KB
/
play.lua
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
local storyboard = require( "storyboard" )
local scene = storyboard.newScene()
local ui = require "scripts.lib.ui"
local radlib = require "scripts.lib.radlib"
---------------------------------------------------------------------------------
-- BEGINNING OF YOUR IMPLEMENTATION
---------------------------------------------------------------------------------
local screen = nil
function scene:createScene( event )
screen = self.view
end
function scene:enterScene( event )
print("Play loaded...")
storyboard.removeAll()
end
function scene:exitScene( event )
end
function scene:destroyScene( event )
end
---------------------------------------------------------------------------------
-- END OF YOUR IMPLEMENTATION
---------------------------------------------------------------------------------
--
-- "createScene" event is dispatched if scene's view does not exist
scene:addEventListener( "createScene", scene )
-- "enterScene" event is dispatched whenever scene transition has finished
scene:addEventListener( "enterScene", scene )
-- "exitScene" event is dispatched before next scene's transition begins
scene:addEventListener( "exitScene", scene )
-- "destroyScene" event is dispatched before view is unloaded, which can be
-- automatically unloaded in low memory situations, or explicitly via a call to
-- storyboard.purgeScene() or storyboard.removeScene().
scene:addEventListener( "destroyScene", scene )
---------------------------------------------------------------------------------
return scene