Cocos2d-x to download the old version of the game change notes

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.