Compilation of Cocos2D-x authoritative guide meying Star War encountered some problems

Source: Internet
Author: User

1: the source code of meying Star War is 2.0.1. I don't know clearly. I am in the latest version 2.14. Of course, I will encounter some problems.

Basically, the code has been revised, and some name issues are easy to modify.

2: The compilation is successful. An error occurs during the running process. Tangle: this error is reported after two bullets are released.

Finally, in the initialization bullet, mybullet-> setisnotvisable (); the function is changed to mybullet-> setisnotvisable (ccobject * psender); the problem is solved and the cause is unknown.

3: When porting the Win32 program to Android, the source files in Win32 are case-insensitive while those in Android phones are case-insensitive, so when I run a program on my mobile phone, the app will be automatically launched when the image is required. For example, the following two files are capitalized in the code.

Newgamea.png?boom1.png

4: The font is incorrect. Although Chinese characters are garbled in Win32, they can be normally displayed on the phone.

5: Another problem was found recently. An error occurred during the second game. It turns out to be

Use the following method to add a touch screen event in onenter () of the Hero class. You must manually remove the event from onexit ().

Ccdirector * pdirector = ccdirector: shareddire ();
Pdirector-> gettouchdispatcher ()-> addtargeteddelegate (

This, // implement the touch screen callback function in that class

0, // priority, the smaller the first response

True); // indicates whether the touch time is intercepted by the target.

// You must manually remove the touch screen event.
Ccdirector * pdirector = ccdirector: shareddire ();
Pdirector-> gettouchdispatcher ()-> removedelegate (this );

Otherwise, during the second game, the callback function of the Hero created for the first time will still be called, but the parent node cannot be obtained, so an error is returned!

The following is the meow Star War. All the files are in

Vs2010 + cocos2d-x 2.14

Http://download.csdn.net/detail/liying426/5822699

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.