官术网_书友最值得收藏!

Time for action – running the test samples

You can open the test project just like you would any other Xcode/Eclipse project:

  1. 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.
  2. You can follow the same steps as before to build this project.
  3. 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.
  4. Once the project is opened in Xcode, you must select the correct target next to the Run button as follows:
    Time for action – running the test samples
  5. In order to actually review the code inside the tests, you may navigate to tests/cpp-tests/Classes for the C++ tests or tests/lua-tests/src for the Lua tests. Better yet, if you have a program such as TextWrangler 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.

主站蜘蛛池模板: 奇台县| 罗平县| 永顺县| 宕昌县| 施秉县| 寿宁县| 历史| 乡城县| 鹤壁市| 仁布县| 井冈山市| 正定县| 贺兰县| 高州市| 中阳县| 蕉岭县| 霍城县| 罗定市| 酉阳| 涟源市| 酒泉市| 于都县| 彭山县| 临夏县| 霍山县| 阳东县| 正安县| 察隅县| 文水县| 阿拉善左旗| 石棉县| 万源市| 会泽县| 平远县| 锡林浩特市| 泸溪县| 兴和县| 呼和浩特市| 嘉定区| 东台市| 济宁市|