758 questions
0 votes
1 answer
22 views
How to prevent events from propagating from the ccui layer to the cc layer in Cocos 3.10?
Currently, I'm learning Cocos in Javascript, I built a map layer extended cc.Layer, and a hub layer extended ccui.Layout. However, I got problem that interactions in the Hub, such as Click, also ...
1 vote
0 answers
42 views
Orientation change stretches sprite briefly before scene loads in Cocos Creator 3.8.2
I’m working with Cocos Creator 3.8.2, and I’m implementing orientation changes dynamically on Android when switching scenes. Here’s the relevant code: director.loadScene(this.ReturnGameSceneName(), () ...
1 vote
0 answers
43 views
Text Preview in EditBox Component input
I get trouble with the same problem when I trying to create a EditBox in Cocos Creator 3.8. Here is topic link https://forum.cocos.org/t/topic/156310 When the interface is playing the zoom animation, ...
0 votes
1 answer
132 views
SocketIO failed to handshake, dont know why
I'm trying to connect a socket in Cocos2dx with a server in Nodejs but it does not work as expected. Here is my code: In HelloWorldScene.h class HelloWorld : public cocos2d::Layer, public SocketIO::...
0 votes
1 answer
112 views
How to Check for Constant KeyPress in Cocos2d-X? (C++)
I have been trying to code/develop a function in cocosd2x-x that does a specified action (in my case move the player sprite) , while a key is being pressed; Since Cocos2d-x does not have a specific ...
-1 votes
1 answer
160 views
Cocos2dx Crash - Version 3.17.2
how to solve these cocos2dx game crashes? following is the backtrace: Fatal Exception: java.lang.AbstractMethodError: abstract method “void android.content.pm.PackageManager$OnChecksumsReadyListener....
2 votes
1 answer
243 views
" java.lang.NullPointerException" when trying to run new Cocos-2dX android project
This error is bothering me for days. As I mentions, I've create a new project but cannot run it (The project builds on Win32 well but Android). What I have done: Downloaded all required: Cocos2d-X v3....
2 votes
0 answers
188 views
Cocos 2dx control playback speed of currently playing audio effect
Hi I am playing a sound effect in a cocos game using this method from SimpleAudioEngine Is there a way to control the playback rate (speed up or slow down) of this audio at runtime. int playEffect(...
1 vote
0 answers
47 views
How can I override a parameter in CC_SYNTHESIZE in c++?
as I told, I don't understand how can I override a CC_SYNTHESIZE. I want to remove a warning on this line. CC_SYNTHESIZE(**int** , idObject, IdObject); WARNING: 'getIdObject' overrides a member ...
0 votes
1 answer
169 views
Create common modules between projects [COCOS2D]
Hello I want to make some projects(games) with cocos2d(im new into this) that will take code or maybe some assets from a common folder. how can i achieve that? for example i write a generic module ...
3 votes
0 answers
251 views
Why does application output freeze on breakpoint in QtCreator?
I've found that stopping a program in QtCreator at a breakpoint stops the program output. For example, the following program gives this output when it hits the breakpoint: #include <QDebug> #...
0 votes
1 answer
76 views
cocos2dx-3.10 covertToWorldSpace result is wrong when using OrbitCamera
cocos2dx-3.10 covertToWorldSpace result is wrong when using OrbitCamera devices test on:Windows Steps to Reproduce: local size = cc.size(400, 400) local layer = cc.LayerColor:create(cc.c4b(200, 0, 0,...
0 votes
1 answer
206 views
cocos2d, can we call a function in "sequence" on a sprite?
first I am moving the sprite from a to b. when it reaches b, I need to call a function to work on the sprite, i.e fade, change image etc. I am currently doing it with a "sequence". var ...
0 votes
1 answer
129 views
Which EventDispatcher to use in cocos2d ? Node::EventDispatcher or Director::EventDispatcher?
Which EventDispatcher to use in cocos2d ? Node::EventDispatcher or Director::EventDispatcher ? After referencing the official documentation of both Director class and Node class Director Class ...
1 vote
1 answer
257 views
Tiled map not rendered fully
I'm using cocos2d-x 3.17. When I run a Follow action on a sprite, the tiled map can't render fully. The map looks exactly the same as the screen record shows in posts below https://discuss.cocos2d-x....