当前位置:网站首页>Some problems encountered in cocos2d-x project summary
Some problems encountered in cocos2d-x project summary
2022-07-05 19:59:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack , I've prepared for you today Idea Registration code .
I've been using it these days Cocos2D-X Try to play a little game , Of course not innovation , Just pure imitation , Is to apply the technology I learned during this period of time to practice .
In the process . There are some problems , Here I would like to make a summary , In order to avoid similar problems in the future .
Share with you , I hope it can help you in your future development , Even a little , It will live up to its original intention .
1. After entering the scene, the expected control movement effect does not appear
The reason for the error : There is no call to the parent class onEnter() Method
2.SimpleAudioEngine Can't find
The reason for the error : No import #include “SimpleAudioEngine.h” The header file
There is no reference using namespace CocosDenshion; Namespace
3. call
CCDirector::sharedDirector()->replaceScene(GameAbout::scene());
After switching scenes , The new scene is explicitly blank
The reason for the error : No use CREATE_FUNC(GameAbout); Macros create new scenes
4. use VS2012 The compiled project. Reuse VS2010 The following error occurs during execution :
fatal error LNK1123: The switch to COFF The period failed : Invalid or corrupt file
Solutions such as the following :
project \ attribute \ Configuration properties \ Listing tools \ Input and output \ Embedded manifest : Turned out to be “ yes ”, Change to “ no ”.
5.CCSpriteBatchNode only support CCSprite
The reason for the error : Will not CCSprite Objects are added to CCSpriteBatchNode On the object
6. Expect the effect of Title Movement . The effect of background movement actually appears
The reason for the error : Title and background tag Over and over again
7. The genie cannot respond to touch events
The reason for the error : Touch event agent is not registered
CCDirector->sharedDirector()->getTouchDispatcher()->addTargetedDelegate(this, 0, true);
8. The location of the touch point cannot be correctly inferred after registering the touch event
The reason for the error : The touch point coordinates are not converted to CCNode The relative coordinates of
convertTouchToNodeSpaceAR(touch)
9. When touching move , Not invoked ccTouchMoved Method
The reason for the error :ccTouchBegan The return value of the method is false
10. No animation effect after creating animation
The reason for the error : The following method was not called
animation->setDelayPerUnit(0.2f); // Set the time interval between two frames
animation->setRestoreOriginalFrame(true); // Whether to play from the original frame
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/117730.html Link to the original text :https://javaforall.cn
边栏推荐
猜你喜欢
Debezium series: record the messages parsed by debezium and the solutions after the MariaDB database deletes multiple temporary tables
How to select the Block Editor? Impression notes verse, notation, flowus
Android interview classic, 2022 Android interview written examination summary
解决php无法将string转换为json的办法
95后阿里P7晒出工资单:狠补了这个,真香...
How to safely and quickly migrate from CentOS to openeuler
S7-200SMART利用V90 MODBUS通信控制库控制V90伺服的具体方法和步骤
Zhongang Mining: analysis of the current market supply situation of the global fluorite industry in 2022
leetcode刷题:二叉树15(找树左下角的值)
Redis cluster simulated message queue
随机推荐
C application interface development foundation - form control (5) - grouping control
Force buckle 729 My schedule I
通过POI追加数据到excel中小案例
再忙不能忘安全
四万字长文说operator new & operator delete
ffplay文档[通俗易懂]
微信小程序正则表达式提取链接
Force buckle 1200 Minimum absolute difference
gst-launch的-v参数
Jvmrandom cannot set seeds | problem tracing | source code tracing
MySql的root密码忘记该怎么找回
Postman core function analysis - parameterization and test report
js实现禁止网页缩放(Ctrl+鼠标、+、-缩放有效亲测)
ACM getting started Day1
leetcode刷题:二叉树15(找树左下角的值)
Flume series: interceptor filtering data
Successful entry into Baidu, 35K monthly salary, 2022 Android development interview answer
Worthy of being a boss, byte Daniel spent eight months on another masterpiece
国信证券在网上开户安全吗?
IBM has laid off 40 + year-old employees in a large area. Mastering these ten search skills will improve your work efficiency ten times