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