当前位置:网站首页>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
边栏推荐
- C langue OJ obtenir PE, ACM démarrer OJ
- What are general items
- Build your own website (16)
- Float. The specific meaning of the return value of floattorawintbits is to convert float into byte array
- 安信证券在网上开户安全吗?
- Flume series: interceptor filtering data
- id选择器和类选择器的区别
- Debezium series: modify the source code to support drop foreign key if exists FK
- Go language | 02 for loop and the use of common functions
- leetcode刷题:二叉树16(路径总和)
猜你喜欢

淺淺的談一下ThreadLocalInsecureRandom

The city chain technology Digital Innovation Strategy Summit was successfully held

js实现禁止网页缩放(Ctrl+鼠标、+、-缩放有效亲测)

95后阿里P7晒出工资单:狠补了这个,真香...

Force buckle 1200 Minimum absolute difference

深度学习 卷积神经网络(CNN)基础

Go language | 02 for loop and the use of common functions

Inventory of the most complete low code / no code platforms in the whole network: Jiandao cloud, partner cloud, Mingdao cloud, Qingliu, xurong cloud, Jijian cloud, treelab, nailing · Yida, Tencent clo

Redis cluster simulated message queue

leetcode刷题:二叉树15(找树左下角的值)
随机推荐
Debezium series: PostgreSQL loads the correct last submission LSN from the offset
众昂矿业:2022年全球萤石行业市场供给现状分析
leetcode刷题:二叉树18(最大二叉树)
Xaas trap: all things serve (possible) is not what it really needs
S7-200smart uses V90 Modbus communication control library to control the specific methods and steps of V90 servo
【obs】libobs-winrt :CreateDispatcherQueueController
Go language | 01 wsl+vscode environment construction pit avoidance Guide
如何安全快速地从 Centos迁移到openEuler
618 "low key" curtain call, how can baiqiushangmei join hands with the brand to cross the "uncertain era"?
Go language learning tutorial (16)
Summer Challenge harmonyos - realize message notification function
解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
Android interview classic, 2022 Android interview written examination summary
Webuploader file upload drag upload progress monitoring type control upload result monitoring control
The city chain technology Digital Innovation Strategy Summit was successfully held
SecureRandom那些事|真伪随机数
[C language] string function and Simulation Implementation strlen & strcpy & strcat & StrCmp
什么是pyc文件
常用运算符与运算符优先级
再忙不能忘安全