当前位置:网站首页>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
边栏推荐
- 【obs】libobs-winrt :CreateDispatcherQueueController
- 完爆面试官,一线互联网企业高级Android工程师面试题大全
- Four methods of random number generation | random | math | threadlocalrandom | securityrandom
- 建立自己的网站(16)
- Fundamentals of deep learning convolutional neural network (CNN)
- 随机数生成的四种方法|Random|Math|ThreadLocalRandom|SecurityRandom
- 中金财富在网上开户安全吗?
- Thread pool parameters and reasonable settings
- Multi branch structure
- 40000 word Wenshuo operator new & operator delete
猜你喜欢
leetcode刷题:二叉树11(平衡二叉树)
Debezium series: record the messages parsed by debezium and the solutions after the MariaDB database deletes multiple temporary tables
leetcode刷题:二叉树12(二叉树的所有路径)
力扣 729. 我的日程安排表 I
What is the core value of testing?
深度学习 卷积神经网络(CNN)基础
Force buckle 729 My schedule I
Postman core function analysis - parameterization and test report
leetcode刷题:二叉树16(路径总和)
深度學習 卷積神經網絡(CNN)基礎
随机推荐
建立自己的网站(16)
【C语言】字符串函数及模拟实现strlen&&strcpy&&strcat&&strcmp
Xaas trap: all things serve (possible) is not what it really needs
third-party dynamic library (libcudnn.so) that Paddle depends on is not configured correctl
Fundamentals of deep learning convolutional neural network (CNN)
gst-launch的-v参数
通过POI追加数据到excel中小案例
How to retrieve the root password of MySQL if you forget it
Thread pool parameters and reasonable settings
Postman core function analysis - parameterization and test report
How to safely and quickly migrate from CentOS to openeuler
C - sequential structure
BZOJ 3747 POI2015 Kinoman 段树
淺淺的談一下ThreadLocalInsecureRandom
解决php无法将string转换为json的办法
Summer Challenge harmonyos - realize message notification function
sun.misc.BASE64Encoder报错解决方法[通俗易懂]
1:引文;
Worthy of being a boss, byte Daniel spent eight months on another masterpiece
完爆面试官,一线互联网企业高级Android工程师面试题大全