- 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.
推薦閱讀
- ExtGWT Rich Internet Application Cookbook
- 精通搜索分析
- 網(wǎng)絡(luò)爬蟲(chóng)原理與實(shí)踐:基于C#語(yǔ)言
- Oracle Exadata專(zhuān)家手冊(cè)
- 青少年學(xué)Python(第1冊(cè))
- Cybersecurity Attacks:Red Team Strategies
- 深度學(xué)習(xí):Java語(yǔ)言實(shí)現(xiàn)
- Web前端應(yīng)用開(kāi)發(fā)技術(shù)
- UI設(shè)計(jì)全書(shū)(全彩)
- Domain-Driven Design in PHP
- Practical Microservices
- Photoshop CC移動(dòng)UI設(shè)計(jì)案例教程(全彩慕課版·第2版)
- QlikView Unlocked
- Python Projects for Kids
- Learning Java Lambdas