forked from Juhee-Park/somsomcafe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.lua
More file actions
123 lines (100 loc) · 4.02 KB
/
Copy pathdev.lua
File metadata and controls
123 lines (100 loc) · 4.02 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
-----------------------------------------------------------------------------------------
--
-- view1.lua
--
-----------------------------------------------------------------------------------------
local composer = require( "composer" )
local scene = composer.newScene()
function scene:create( event )
local sceneGroup = self.view
--------------------------------------------------------------------------------------------------------------------
-- 배경이미지 삽입
local background = display.newImageRect("img/end_background/background.png", display.contentWidth, display.contentHeight)
background.x, background.y = display.contentWidth/2, display.contentHeight/2
-- 나가기이미지 삽입
local dev_out = display.newImage("img/recipe/recipe_out.png")
dev_out.x, dev_out.y = 1267, 175
-- 이름 삽입
local creator = display.newText("CREATOR", display.contentWidth/2, display.contentHeight*0.22)
creator:setFillColor(0)
creator.size = 120
local planner = display.newText("기획", display.contentWidth/2, display.contentHeight*0.32)
planner:setFillColor(0)
planner.size = 120
local name = display.newText("박주희", display.contentWidth/2, display.contentHeight*0.37)
name:setFillColor(0.4)
name.size = 120
local develop = display.newText("개발", display.contentWidth/2, display.contentHeight*0.47)
develop:setFillColor(0)
develop.size = 120
local name1 = display.newText("강도경 송예림 이현아", display.contentWidth/2, display.contentHeight*0.52)
name1:setFillColor(0.4)
name1.size = 120
local name2 = display.newText("박주희 임지수 황지민", display.contentWidth/2, display.contentHeight*0.57)
name2:setFillColor(0.4)
name2.size = 120
local disign = display.newText("디자인", display.contentWidth/2, display.contentHeight*0.67)
disign:setFillColor(0)
disign.size = 120
local name3 = display.newText("김지윤", display.contentWidth/2, display.contentHeight*0.72)
name3:setFillColor(0.4)
name3.size = 120
-- 시작 버튼 이벤트
local function dev_out_button_event( event )
if( event.phase == "began" ) then
composer.gotoScene( "start" )
end
end
dev_out:addEventListener("touch", dev_out_button_event)
--------------------------------------------------------------------------------------------------------------------
sceneGroup:insert(background)
sceneGroup:insert(creator)
sceneGroup:insert(planner)
sceneGroup:insert(name)
sceneGroup:insert(develop)
sceneGroup:insert(name1)
sceneGroup:insert(name2)
sceneGroup:insert(disign)
sceneGroup:insert(name3)
sceneGroup:insert(dev_out)
end
function scene:show( event )
local sceneGroup = self.view
local phase = event.phase
if phase == "will" then
-- Called when the scene is still off screen and is about to move on screen
elseif phase == "did" then
-- Called when the scene is now on screen
--
-- INSERT code here to make the scene come alive
-- e.g. start timers, begin animation, play audio, etc.
end
end
function scene:hide( event )
local sceneGroup = self.view
local phase = event.phase
if event.phase == "will" then
-- Called when the scene is on screen and is about to move off screen
--
-- INSERT code here to pause the scene
-- e.g. stop timers, stop animation, unload sounds, etc.)
composer.removeScene('dev')
elseif phase == "did" then
-- Called when the scene is now off screen
end
end
function scene:destroy( event )
local sceneGroup = self.view
-- Called prior to the removal of scene's "view" (sceneGroup)
--
-- INSERT code here to cleanup the scene
-- e.g. remove display objects, remove touch listeners, save state, etc.
end
---------------------------------------------------------------------------------
-- Listener setup
scene:addEventListener( "create", scene )
scene:addEventListener( "show", scene )
scene:addEventListener( "hide", scene )
scene:addEventListener( "destroy", scene )
-----------------------------------------------------------------------------------------
return scene