- Cocos2d-x by Example:Beginner's Guide(Second Edition)
- Roger Engelbert
- 241字
- 2021-07-23 20:00:24
Time for action – running the test samples
You can open the test project just like you would any other Xcode/Eclipse project:
- In Eclipse, you can import the test project from inside the Cocos2d-x folder you downloaded. You'll find it in
tests/cpp-tests/proj.android
. - You can follow the same steps as before to build this project.
- In Xcode, you must open the tests project file that you'll find in the Cocos2d-x framework folder inside the
build
folder:build/cocos2d_tests.xcodeproj
. - Once the project is opened in Xcode, you must select the correct target next to the Run button as follows:
- In order to actually review the code inside the tests, you may navigate to
tests/cpp-tests/Classes
for the C++ tests ortests/lua-tests/src
for the Lua tests. Better yet, if you have a program such asTextWrangler
or an equivalent, you can open these entire directories inside a Disk Browser window and have all that information ready for referencing right at your desktop.
What just happened?
With the test samples, you can visualize most features in Cocos2d-x, what they do, as well as see some of the ways you can initialize and customize them.
I will refer to the code found in the tests quite often. As usual with programming, there is always a different way to accomplish the same task, so sometimes, after showing you one way, I'll refer to a different one that you can find (and by then easily understand) inside the Test
classes.
推薦閱讀
- 案例式C語言程序設(shè)計(jì)
- 精通JavaScript+jQuery:100%動(dòng)態(tài)網(wǎng)頁(yè)設(shè)計(jì)密碼
- Learning Apex Programming
- Android Development with Kotlin
- 從0到1:HTML+CSS快速上手
- Python數(shù)據(jù)挖掘與機(jī)器學(xué)習(xí)實(shí)戰(zhàn)
- 算法訓(xùn)練營(yíng):提高篇(全彩版)
- 網(wǎng)站構(gòu)建技術(shù)
- Working with Odoo
- Active Directory with PowerShell
- JavaCAPS基礎(chǔ)、應(yīng)用與案例
- Hands-On JavaScript for Python Developers
- 區(qū)塊鏈國(guó)產(chǎn)化實(shí)踐指南:基于Fabric 2.0
- 一步一步跟我學(xué)Scratch3.0案例
- HTML5 WebSocket權(quán)威指南