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

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.

主站蜘蛛池模板: 苗栗县| 博乐市| 新津县| 卢湾区| 兰溪市| 蓬莱市| 德惠市| 二连浩特市| 扎鲁特旗| 涞源县| 蓬溪县| 许昌县| 什邡市| 收藏| 泸水县| 太湖县| 天峻县| 凤台县| 湖口县| 湾仔区| 齐河县| 娄底市| 观塘区| 梨树县| 凌源市| 任丘市| 隆林| 平乐县| 海林市| 萝北县| 开封县| 阿荣旗| 那曲县| 柳江县| 佳木斯市| 阜平县| 永福县| 定襄县| 都匀市| 灌南县| 平遥县|