- Corona SDK Mobile Game Development:Beginner's Guide(Second Edition)
- Michelle M. Fernandez
- 220字
- 2021-07-23 19:37:13
Time for action – creating a Hello World application in two lines of code
Now that we have the simulator and text editors set up, let's start making our very first Corona program! The first program that we will make is called Hello World
. It is a traditional program that many people learn when starting a new programming language.
- Open your preferred text editor and type the following lines:
textObject = display.newText( "Hello World!", 160, 80, native.systemFont, 36 ) textObject: setFillColor ( 1, 1, 1 )
- Next, create a folder on your desktop called
Hello World
. Save the preceding text as a file namedmain.lua
to the location of your project folder. - Launch Corona. You will be greeted with the Corona SDK screen. Click on Open and navigate to the
Hello World
folder you just created. You should see yourmain.lua
file in this folder: - On a Mac, click on the Open button. On Windows, select the
main.lua
file and click on the Open button. You'll see your new program running in the Corona simulator:
Tip
Downloading the example code
You can download the example code files for all Packt Publishing books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
推薦閱讀
- DBA攻堅指南:左手Oracle,右手MySQL
- Visual Basic 6.0程序設計計算機組裝與維修
- Python零基礎快樂學習之旅(K12實戰訓練)
- 嚴密系統設計:方法、趨勢與挑戰
- Apache Kafka Quick Start Guide
- C/C++程序員面試指南
- C++寶典
- 持續集成與持續交付實戰:用Jenkins、Travis CI和CircleCI構建和發布大規模高質量軟件
- Android嵌入式系統程序開發:基于Cortex-A8(第2版)
- Learning Kotlin by building Android Applications
- IBM RUP參考與認證指南
- SAS編程演義
- Java面試一戰到底(基礎卷)
- 絕密原型檔案:看看專業產品經理的原型是什么樣
- Spring Boot 2+Thymeleaf企業應用實戰