-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
54 lines (42 loc) ยท 1.46 KB
/
Copy pathmain.lua
File metadata and controls
54 lines (42 loc) ยท 1.46 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
-----------------------------------------------------------------------------------------
--////
-- main.lua
-----------------------------------------------------------------------------------------
-- ์๋ฉ ํ์ผ
local loadsave = require( "loadsave" )
local composer = require( "composer" )
local json = require( "json" )
loadedEndings = loadsave.loadTable( "endings.json" )
-- show default status bar (iOS)
display.setStatusBar( display.DefaultStatusBar )
-- include Corona's "widget" library
local widget = require "widget"
local composer = require "composer"
point=0
-- event listeners for tab buttons:
local function onFirstView( event )
-- Path for the file to read
local path = system.pathForFile( "endings.json", system.DocumentsDirectory)
-- Open the file handle
local file, errorString = io.open( path, "r" )
composer.gotoScene("title")
--[[if not file then
local titleMusic = audio.loadStream( "์์
/ํ์ดํ.mp3" )
audio.play(titleMusic)
audio.setVolume( 0.5 )
composer.gotoScene( "title" )
else
local titleMusic = audio.loadStream( "์์
/ํ์ดํ.mp3" )
audio.play(titleMusic)
audio.setVolume( loadedEndings.logValue )
composer.gotoScene( "title" )
end]]
end
local function onSecondView( event )
composer.gotoScene( "view00Room" )
end
local function on3View( event )
composer.gotoScene( "store" )
end
onFirstView() -- invoke first tab button's onPress event manually
--์์ ๋