Notes for cocos2d-x 1

Source: Internet
Author: User

1. During cygwin compilation, resources in the resource will be automatically copied to the assert directory of the android Project (android extracts resources from the assert directory) and overwrite the original resources.


2. the array created using CCArray: array (), even if the array is already a member variable of the current class, you must make a retain. Otherwise, when the function that creates the array returns, CCArray will be released directly.


3. Log printing: CCLog ("touch, x = % f, y = % f", pos. x, pos. y );

It seems that an error occurs when printing: CCLog ("touch, x = % d y = % f", iTemp, fTemp );

No problem: CCLog ("touch, x = % f y = % d",. fTemp, iTemp );

It is best to print data of different data types separately:
CCLog ("touch, x = % f", fTemp );

CCLog ("touch, y = % d", iTemp );

 

4. After action stop on sprite, The aciton that getActionByTag is null again.

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.