This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.lua
37 lines (31 loc) · 1.51 KB
/
main.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
-- Project: Corona SDK Reference Project Template
--
-- Date: March 23, 2015
--
-- Version: 0.1
--
-- Author: Serkan Aksit -> https://github.com/sekodev -> https://twitter.com/sekodev
-- Sleepy Bug Studios -> http://sleepybugstudios.com -> https://www.facebook.com/sleepybugstudios
--
-- Tools: Sublime Text 3 with Corona Editor 1.5.1
--
-- Update History:
-- 0.1 - Initial release
--
-- Please refer to sources below for more and up-to-date information
-- Corona SDK Docs: http://docs.coronalabs.com
-- Lua docs: http://www.lua.org/docs.html
-- main
-- Origin. The starting point of your project.
-- This is the only file Corona SDK will require to work. If it doesn't exist, you'll see an error.
local composer = require ("composer") -- Include the Composer library
-- You can refer to this document for more information about Composer -> http://docs.coronalabs.com/api/library/composer/index.html
-- You can make Composer store your variables by this method.
-- Consider these, global variables that Composer stores for you.
-- Later in the project, you can call use/change this variables.
-- It doesn't matter if it's a string or a number in Lua. I just named them like this for easier understanding.
composer.setVariable("variableString", "Game Level")
composer.setVariable("fontSize", 64)
-- Go to the "logo" scene that's inside "screens" folder in 1000 ms with the "crossFade" effect
-- Refer to the Composer API for more transition options.
composer.gotoScene("screens.logo", "crossFade", 1000)