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

Time for action – creating your game project

I'll build the game first in Xcode and then show how to take the project to Eclipse, but the folder structure remains the same, so you can work with any IDE you wish and the instructions here will be the same:

  1. Open the terminal and create a new Cocos2d-x project called AirHockey that uses C++ as its main language. I saved mine on the desktop, so the command I had to enter looks like this:
    cocos new AirHockey -p com.rengelbert.AirHockey -l cpp -d /Users/rengelbert/Desktop/AirHockey
    
  2. Once the project is created, navigate to its proj.ios_mac folder and double-click on the AirHockey.xcodeproj file. (For Eclipse, you can follow the same steps we did when we created the HelloWorld project to import the project.)
  3. Select the top item in Project Navigator and making sure the iOS target is selected, edit the information by navigating to General | Deployment info, setting the target device to iPad and Device Orientation to Portrait and Upside Down.
    Time for action – creating your game project
  4. Save your project changes.

What just happened?

You created a Cocos2d-x project targeting iPads, and you are ready to set it up with the rest of the configurations I described earlier.

So let's do that now.

主站蜘蛛池模板: 柯坪县| 凤阳县| 元氏县| 清苑县| 偃师市| 霸州市| 咸阳市| 都江堰市| 尉氏县| 阿拉善左旗| 秦皇岛市| 三穗县| 新化县| 融水| 保德县| 讷河市| 三河市| 慈利县| 萝北县| 蓬安县| 龙山县| 施甸县| 华安县| 千阳县| 如皋市| 鹿邑县| 斗六市| 陆丰市| 门头沟区| 台州市| 明光市| 休宁县| 平湖市| 青田县| 永吉县| 上犹县| 洛浦县| 通化市| 宽甸| 习水县| 霍山县|