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

Time for action – adding the image files

First, we download the resources for this project, and then we add them in Xcode.

  1. Go to this book's Support page (www.packtpub.com/support) and download the 4198_03_RESOURCES.zip file. Inside it, you should find three folders called hd, sd, and fonts.
  2. Go to your Project folder, the actual folder in your system. Drag the three folders to the Resources folder inside your project.
  3. Go back to Xcode. Select the Resources folder in your project navigation panel. Then go to File | Add Files to AirHockey.
  4. In the File window, navigate to the Resources folder and select the sd, hd, and fonts folders.
  5. This is very important: make sure Create folder references for any added folders is selected. Also make sure you selected AirHockey as the target. It wouldn't hurt to make sure Copy items to destination... is also selected.
  6. Click on Add.

What just happened?

You added the necessary image files for your Air Hockey game. These come in two versions: one for retina displays (high definition) and one for non-retina displays (standard definition). It is very important that references are added to the actual folders, only this way Xcode will be able to have two files with the same name inside the project and still keep them apart; one in each folder. We also added the font we'll be using in the game.

Now let's tell Cocos2d-x where to look for the correct files.

主站蜘蛛池模板: 湖南省| 浮山县| 资兴市| 长宁区| 香格里拉县| 镇原县| 巴林右旗| 扶风县| 江源县| 晴隆县| 公主岭市| 新营市| 泸州市| 滦南县| 嘉禾县| 射洪县| 曲松县| 丹阳市| 滨州市| 绥阳县| 夏津县| 丰台区| 陇南市| 西乌珠穆沁旗| 安义县| 耿马| 马公市| 南宁市| 静乐县| 甘德县| 武陟县| 鹰潭市| 文成县| 独山县| 栖霞市| 双辽市| 呈贡县| 宝清县| 普格县| 淮滨县| 金山区|