HTML and CSS Reference
In-Depth Information
CreatING a prOJeCt FOr IOS
For ios, follow these steps.
install Xcode from the app store.
open your web browser, and navigate to the Cocos2d-x download page.
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.
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
Create the project using , as follows:
./ -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! : Done!
proj.win32 : Done!
New project has been created in this path:
Have Fun!
As described above, 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