- Cocos2d-x by Example:Beginner's Guide(Second Edition)
- Roger Engelbert
- 241字
- 2021-07-23 20:00:27
Time for action – adding the image files
First, we download the resources for this project, and then we add them in Xcode.
- 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 calledhd
,sd
, andfonts
. - Go to your
Project
folder, the actual folder in your system. Drag the three folders to theResources
folder inside your project. - Go back to Xcode. Select the
Resources
folder in your project navigation panel. Then go to File | Add Files to AirHockey. - In the File window, navigate to the
Resources
folder and select thesd
,hd
, andfonts
folders. - 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.
- 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.
推薦閱讀
- 從零構建知識圖譜:技術、方法與案例
- 零起步玩轉掌控板與Mind+
- C#編程入門指南(上下冊)
- JavaScript語言精髓與編程實踐(第3版)
- 編寫整潔的Python代碼(第2版)
- C#程序設計(慕課版)
- MySQL數據庫管理與開發(慕課版)
- Python面向對象編程:構建游戲和GUI
- 全棧自動化測試實戰:基于TestNG、HttpClient、Selenium和Appium
- Python Machine Learning Blueprints:Intuitive data projects you can relate to
- SignalR:Real-time Application Development(Second Edition)
- Julia High Performance(Second Edition)
- JavaScript編程精解(原書第2版)
- LabVIEW入門與實戰開發100例(第4版)
- Mastering Drupal 8