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

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.

主站蜘蛛池模板: 鄄城县| 丽江市| 保德县| 南漳县| 石阡县| 宝坻区| 巴塘县| 乐昌市| 双鸭山市| 吴堡县| 军事| 凌源市| 防城港市| 贵德县| 东城区| 屏边| 景泰县| 定西市| 黄陵县| 三原县| 浪卡子县| 和顺县| 金秀| 武定县| 津市市| 安平县| 金寨县| 同心县| 东阿县| 彰化县| 虹口区| 长乐市| 金溪县| 花垣县| 永顺县| 拜泉县| 汉源县| 嘉义市| 五家渠市| 连南| 建德市|