当前位置:网站首页>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
边栏推荐
- 什么是pyc文件
- 挖财钱堂教育靠谱安全吗?
- 618 "low key" curtain call, how can baiqiushangmei join hands with the brand to cross the "uncertain era"?
- Do you know several assertion methods commonly used by JMeter?
- selenium 元素信息
- 【obs】libobs-winrt :CreateDispatcherQueueController
- leetcode刷题:二叉树12(二叉树的所有路径)
- 【obs】QString的UTF-8中文转换到blog打印 UTF-8 char*
- Summer Challenge harmonyos - realize message notification function
- third-party dynamic library (libcudnn.so) that Paddle depends on is not configured correctl
猜你喜欢
Autumn byte interviewer asked you any questions? In fact, you have stepped on thunder
Redis cluster simulated message queue
建立自己的网站(16)
How to select the Block Editor? Impression notes verse, notation, flowus
建议收藏,我的腾讯Android面试经历分享
leetcode刷题:二叉树17(从中序与后序遍历序列构造二叉树)
[C language] string function and Simulation Implementation strlen & strcpy & strcat & StrCmp
Force buckle 729 My schedule I
Go language | 01 wsl+vscode environment construction pit avoidance Guide
How about testing outsourcing companies?
随机推荐
成功入职百度月薪35K,2022Android开发面试解答
浮动元素与父级、兄弟盒子的关系
95后阿里P7晒出工资单:狠补了这个,真香...
[C language] string function and Simulation Implementation strlen & strcpy & strcat & StrCmp
js实现禁止网页缩放(Ctrl+鼠标、+、-缩放有效亲测)
深度學習 卷積神經網絡(CNN)基礎
常用运算符与运算符优先级
MySql的root密码忘记该怎么找回
Go language | 03 array, pointer, slice usage
What does software testing do? What are the requirements for learning?
Wildcard selector
S7-200SMART利用V90 MODBUS通信控制库控制V90伺服的具体方法和步骤
如何安全快速地从 Centos迁移到openEuler
Xaas trap: all things serve (possible) is not what it really needs
Two pits exported using easyexcel template (map empty data columns are disordered and nested objects are not supported)
解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
Go language | 02 for loop and the use of common functions
How about testing outsourcing companies?
c语言oj得pe,ACM入门之OJ~
2023年深圳市绿色低碳产业扶持计划申报指南