Please leave the address (http://blog.csdn.net/keven418440201/article/details/8738851) for the repost. Thank you.
1. First of all, the cocos2d-x versions earlier than 2.0 project folder organization is not the same way, the following are the download of the old version and the new version of the comparison diagram:
The above is an old project downloaded from the Internet,
The preceding two are the folder Organization Methods of the new version 2.1cocos2d-X.
Open an existing project directly, and then modify some old APIs to the new version of the API, which can be compiled but cannot be run. The problem is that resource files such as background images cannot be loaded. If you have a question in the Cocos group, you cannot find the answer (how can I solve this problem when you see this post ).
Solution: Use the dumbest method to create an empty project, copy all the files in classes to the new project, and select include file-> right-click Add-> existing items. Classes and resources are imported in the same way. After compilation, the data is normal.
2, also pay attention to the 2.0 version of The cocos2d-x with a lot of create static method, but createwith... and so on similar methods, replace the old version of do not use errors.
3. Use ccstring to determine equality:
Append the new Traversal method of ccarray by means of slices. Note that only traversal is required. Contents in ccarray cannot be deleted. Otherwise, errors may occur.
Intvalue, floatvalue, and so on can be used only after being forcibly converted to ccstring. For example.