-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview08Number.lua
More file actions
99 lines (78 loc) ยท 3.35 KB
/
Copy pathview08Number.lua
File metadata and controls
99 lines (78 loc) ยท 3.35 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
--ํ๋๋ง์ ์นด๋๊ฒ์ ์๋ฉํ๋ฉด
local loadsave = require( "loadsave" )
local composer = require( "composer" )
local scene = composer.newScene()
function scene:create( event )
local sceneGroup = self.view
-- ๋ฐฐ๊ฒฝ ์ค์
local background = display.newImageRect("์ด๋ฏธ์ง/๋ฏธ๋๊ฒ์/๋ฏธ๋๊ฒ์_ํ๋๋ง์/๋ฏธ๋๊ฒ์_์ซ์๊ฒ์ ๋ฐฐ๊ฒฝ(ํ๋๋ง์).png",display.contentWidth, display.contentHeight)
background.x, background.y = display.contentWidth/2, display.contentHeight/2
sceneGroup:insert( background )
local background1 = display.newRect(display.contentWidth/2, display.contentHeight/2, display.contentWidth, display.contentHeight)
background1:setFillColor(0)
transition.to(background1,{alpha=0.5,time=1000})
sceneGroup:insert(background1)
local function gomap(event)
if event.phase == "began" then
composer.removeScene("view08Number")
composer.gotoScene( "view01Map" )
end
end
local board =display.newImageRect("์ด๋ฏธ์ง/๋ฏธ๋๊ฒ์/๋ฏธ๋๊ฒ์_๊ฒ์์๋ฃ์ฐฝ.png",display.contentWidth/3.6294896, display.contentHeight/2.83122739)
board.x , board.y = display.contentWidth/2, display.contentHeight/2
board.alpha = 0.5
transition.to(board,{alpha=1,time=1000})
sceneGroup:insert(board)
score3 = composer.getVariable("score2")
local showScore1 = display.newText(score3,display.contentWidth/2, display.contentHeight/1.9,"font/์ํ๋ฆฌ๋์ค๋ Medium.ttf")
showScore1:setFillColor(1,0,0)
showScore1.size = 60
sceneGroup:insert(showScore1)
local backtomap =display.newImageRect("์ด๋ฏธ์ง/๋ฏธ๋๊ฒ์/๋ฏธ๋๊ฒ์_์ง๋๋ก ๋์๊ฐ๊ธฐ ๋ฒํผ.png",display.contentWidth/6.112,display.contentHeight/17.3050)
backtomap.x, backtomap.y = display.contentWidth/2, display.contentHeight/1.65466
sceneGroup:insert(backtomap)
backtomap:addEventListener("touch",gomap)
local loadedSettings = loadsave.loadTable( "settings.json" )
loadedSettings.money = loadedSettings.money + score3
print(loadedSettings.money)
loadsave.saveTable(loadedSettings, "settings.json")
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