HTML and CSS Reference
In-Depth Information
CreatING a prOJeCt FOr IOS
For ios, follow these steps.
1.
install Xcode from the app store.
2.
open your web browser, and navigate to the Cocos2d-x download page.
3.
get the latest stable version of Cocos2d-x, and extract it to a location of your choice. this
sample game used the latest version Cocos2d-x at the time of writing, which was v2.2.2.
4.
open terminal app. use the cd command to switch to the directory where you extracted the
Cocos2d-x archive, like so:
cd ~/work/HalloweenDefence/Cocos2d-x-2.2.2/tools/project-creator
5.
Create the project using create_project.py , as follows:
./create_project.py -project HalloweenDefence -package org.Cocos2dx.HalloweenDefence
-language javascript
If you see the information shown in Listing 24-25, the project has been created successfully.
Listing 24-25. Successful Project Creation Log
proj.ios : Done!
proj.android : Done!
proj.win32 : Done!
New project has been created in this path:
/Users/linshun/work/HalloweenDefence/Cocos2d-x-2.2.2/projects/HalloweenDefence
Have Fun!
As described above, create_project.py automatically creates iOS, Android, and win32 projects.
Adding Resources to the Project
Copy all files under the /HalloweenDefence/Cocos2d-html5-v2.2.2/HalloweenDefence of Cocos2d-Html5 project
to directory ~/work/HalloweenDefence/Cocos2d-x-2.2.2/projects/HalloweenDefence/Resources of the Cocos2d-x
JSB project. Your HalloweenDefence Resources group should now look like the image shown in Figure 24-22 .
 
Search WWH ::




Custom Search