-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtutorial.lua
More file actions
175 lines (146 loc) ยท 8.65 KB
/
Copy pathtutorial.lua
File metadata and controls
175 lines (146 loc) ยท 8.65 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
--ํํ ๋ฆฌ์ผ ์ฅ๋ฉด 1๋ถํฐ 7
local loadsave = require( "loadsave" )
local composer = require( "composer" )
local scene = composer.newScene()
local widget = require("widget")
local json = require( "json" )
local i
local j = 1
function scene:create( event )
local sceneGroup = self.view
local b = {}
bGroup = display.newGroup()
local loadedSettings = loadsave.loadTable( "settings.json" )
mainName = loadedSettings.name
-- showoverlay ํจ์ ์ฌ์ฉ option
local options = {
isModal = true
}
--๋ฐฐ๊ฒฝ
for i = 1, 26 do
b[i] = display.newImage(bGroup, "์ด๋ฏธ์ง/์คํ๋/" .. i .. ".png")
end
bGroup.x,bGroup.y = display.contentWidth/2,display.contentHeight/2
sceneGroup:insert(bGroup)
composer.setVariable("find1", 0)
composer.setVariable("find2", 0)
composer.setVariable("find3", 0)
composer.setVariable("find4", 0)
composer.setVariable("find5", 0)
loadsave.saveTable(loadedSettings,"settings.json")
--๋ํ์ฐฝ
--๋์ฌ
local t = {}
t[1] = display.newText("๋ง๋ง๋ํด ๊ฐ์ ์ฐ์ฃผ์ ์ด๋ ํ ๊ตฌ์์๋ ์์ฐํ ํ์ฑ์ด ์๋ค.", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[2] = display.newText("์์ฐํ ํ์ฑ์ 5๊ฐ์ ๋ง์๋ก ์ด๋ฃจ์ด์ ธ ์๊ณ , ๋ง์๋ง๋ค ๊ฐ์ ์์ ๊ฐ์ง ์์ฐํ๋ค์ด ๋ชจ์ฌ ์ฌ๋ ์๋ฆ๋ค์ด ๋ณ์ด๋ค.", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[3] = display.newText("์ฐ๋ฆฌ ์์ฐํ๋ค์ ํ์์์ผ๋ก ํ์ด๋, ์ผ์ ๋์ด๊ฐ ๋๋ฉด ๊ฐ๊ฐ์ ์๊ณผ ๋ชจ์ต์ ๊ฐ์ง๋ค.", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[4] = display.newText("์ด๋ ๊ฐ์ง๊ฒ ๋๋ ์๋ค์ ๊ฐ์์ ์ฑ๊ฒฉ์ ๋ง์ด ๋ฏ๊ณค ํ๋ค.", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[5] = display.newText("์์ฐํ ํ์ฑ์ ๋ง์๋ค์ ์๊ฐํ์๋ฉด, ๋ค์๊ณผ ๊ฐ๋ค.",display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[6] = display.newText("์ฌ๋์ด ์์๋ ์์ฐํ๋ค์ด ๋ชจ์ฌ ์ฌ๋ ๊ณณ, ์๋ก๋ฅผ ์ฌ๋ํ๋ฉฐ ์ด์๊ฐ๋ ๋นจ๊ฐ ๋ง์!", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[7] = display.newText("์ธ์ ๋ ์ฆ๊ฑฐ์! ์ ๋๋ ๋
ธ๋๊ฐ ํ๋ฌ๋์ค๊ณ , ํ๊ธฐ์ฐฌ ์์์๋ฆฌ๊ฐ ๋์ด์ง ์๋ ๋
ธ๋ ๋ง์!", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[8] = display.newText("์น๊ตฌ๋ฅผ ์๊ฐํ๋ ๋ฐ๋ปํ ๋ง์์จ๋ฅผ ๊ฐ์ง ์์ฐํ๋ค์ด ๋ชจ์ฌ ์ฌ๋ ๊ณณ, ์ด๋ก ๋ง์!", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[9] = display.newText("์๋ ๊ฒ์ด ํ์ด์ง! ์งํ๋ก์์ ์ค์ํ๋ ์์ฐํ๋ค์ ํ๋ ๋ง์!", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[10] = display.newText("๋ชจ๋ ์์์ ์๋๋ ฅ์ ์ฉ๊ฐํจ์ด์ผ! ์ฉ๊ธฐ ์๋ ์์ฐํ๋ค์ด ์ฌ๋ ๋ณด๋ผ ๋ง์!", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[11] = display.newText("...์ ๊ฐ๋ค.", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[12] = display.newText("๊ทธ๋ฐ๋ฐ ๋๋.....", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[13] = display.newText("์๋๋๋ก๋ผ๋ฉด, ๋๋ ๋ด ์น๊ตฌ๋ค์ฒ๋ผ ์ง๊ธ์ฏค ์์ ๊ฐ์ง๊ณ ์์ด์ผ ํ๋๋ฐ.. ์ ๋๋ ์์ด ์์๊น?", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[14] = display.newText("๋ด๊ฐ ๋ถ์กฑํด์ ์์ด ์์๊ธฐ๋ ๊ฑธ๊น? ์ํ๋ ๊ฒ๋ ์๊ณ ์ข์ํ๋ ๊ฒ๋ ์์ด์ ๊ทธ๋ฐ ๊ฑธ๊น?", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[15] = display.newText("์ด๋๋ก ์์ ํ์์ ์์ฐํ์ด๊ธด ์ซ์ด!", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[16] = display.newText("๋๋ ๋จ๋ค์ฒ๋ผ ์์ ์์ ๊ฐ์ง๊ณ ์ถ๋จ ๋ง์ด์ผ!", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[17] = display.newText("์ด์ ๋๋ ์ด๋ป๊ฒ ํด์ผํ์งยทยทยท?", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[18] = display.newText(mainName ..", ์ค๋๋ฐ๋ผ ์ฐ์ธํด๋ณด์ด๋ค.", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[19] = display.newText("์์ง ์๋ค์, ์ฌ์ค ๊ณ ๋ฏผ์ด ์์ด. ๋๋ ์ ๋ํฌ์ฒ๋ผ ๋ฉ์ง ์์ด ์๊ธฐ์ง ์๋ ๊ฑธ๊น?", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[20] = display.newText("ํยทยทยท ๊ทธ๋ฌ๊ฒ. ์ด๋ ์ํ๊ฑฐ ์๋์ผ ".. mainName .."? ๊ด์ฐฎ์?", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[21] = display.newText("๊ทธ๋ผ ํ์ ํ์์์ผ๋ก ์ด์์ผ ํ๋๊ฑฐ์ผ? ์ง์ฐ๊ฐ์ฒ๋ผ? ์๋ผ!", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[22] = display.newText("์๋ฌด๋๋ ์ด๊ฑธ ํด๊ฒฐํ์ง ์์ผ๋ฉด ํฐ์ผ๋๊ฒ ์ด. ๊ณ ๊น๋ชจ์๋ฅผ ์ด ์์ด์ํ์ธ์ฒ๋ผ!", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[23] = display.newText("๊ฑฑ์ ๋ง ".. mainName .."! ์ฐ๋ฆฌ๊ฐ ๋์์ค๊ฒ! ๋ถ๋ช
๋์ฒ๋ผ ๋ฉ์ง ์์ ์ฐพ์ ์ ์์๊ฑฐ์ผ.", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[24] = display.newText("\"๋ง์, ์ฐ๋ฆฌ๊ฐ ๋์์ค๊ฒ!\"", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundB.ttf", 30)
t[25] = display.newText("\"๊ณ ๋ง์ ์๋ค์ยทยทยท!\"", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
t[26] = display.newText("'์ด์ฌํ ๋
ธ๋ ฅํด์ ๋ฐ๋์ ์์ ๋์ฐพ๊ณ ๋ง ๊ฑฐ์ผ!'", display.contentWidth * 0.5, display.contentHeight * 0.93, "font/NanumSquareRoundR.ttf", 30)
for i = 2, 26 do
b[i].alpha = 0
t[i].alpha = 0
end
for i = 1, 26 do
if i == 18 then
t[i]:setFillColor(0, 0.4, 0)
elseif i == 20 then
t[i]:setFillColor(1, 0.2, 0.3)
elseif i == 21 then --o
t[i]:setFillColor(1, 0.4, 0.1)
elseif i == 22 then--b
t[i]:setFillColor(0.2, 0.4, 0.8)
elseif i == 23 then --p
t[i]:setFillColor(0.5, 0.2, 0.7)
else
t[i]:setFillColor(alpha)
end
sceneGroup:insert(t[i])
end
-- ํ๋ฉด์ ํ
local function next1()
if j > 1 and j < 26 then
b[j - 1].alpha = 0
t[j - 1].alpha = 0
b[j].alpha = 1
t[j].alpha = 1
end
j = j + 1
if j == 28 then
composer.removeScene("tutorial")
composer.gotoScene("view01_month")
end
end
local skipButton = display.newImage("์ด๋ฏธ์ง/์คํ๋/์คํต๋ฒํผ.png") -- ์คํต ๋ฒํผ
skipButton.x, skipButton.y = display.contentWidth * 0.93, display.contentHeight * 0.1
skipButton.alpha = 1
sceneGroup:insert(skipButton)
local function skip_tutorial()
skipButton.alpha = 0
Runtime:removeEventListener("tap", next1)
composer.removeScene("tutorial")
audio.pause(tutorialMusic)
composer.gotoScene( "view01_guide(new)" )
end
skipButton:addEventListener("tap",skip_tutorial)
Runtime:addEventListener("tap", next1)
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.)
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