Questions tagged [Cocos2d] (45)

0
answer

How to make a skeleton for the textures and animation in cocos2d?

Side view, thinking of how to make a physics body and smash it to pieces with the possibility of replacing textures, adding. Example: a character and I want to change his hairstyle or hat, pants, shoes, etc. While animation is in the skeleton, like running shoes or walking, strike. Found this on request cocos2d skeletal a...
clemen asked April 7th 20 at 16:39
0
answer

There are guides, tutorials, documentation for Cocos2d-x Lua?

Looking for tutorials on cocos2d Lua, the language doesn't matter.
Electa asked April 7th 20 at 16:23
1
answer

How to adapt the width for tablets and larger screens?

Is conditionally races like in Tetris, tetrominoes or. To stretch this game horizontally will be ugly. I've seen it solve other: 1 - disable screen rotation in the game, then the user will be forced to keep to a specific orientation of the device 2 - crop the screen to replace free space with a dark screen or other backgro...
broderick1 asked April 4th 20 at 13:39
0
answer

0xDDDDDDDD validation?

pointDrawNode = DrawNode::create();ssize_t Node::getNumberOfRunningActions() const { return _actionManager->getNumberOfRunningActionsInTarget(this); }Exception thrown: read access violation. this->_actionManager was 0xDDDDDDDD.void PlayScene::update(float timeBetweenFrames) { if (pointDrawNode != nullptr && ...
Sallie_Hansen28 asked April 4th 20 at 12:37
0
answer

Audioengine::play2d throws this->**_hashForTimers**?

AudioEngine::play2d("sounds/hit.mp3");void Scheduler::unschedule(SEL_SCHEDULE selector, Ref *target) { // explicit handle nil arguments when removing an object if (target == nullptr || selector == nullptr) { return; } tHashTimerEntry *element = nullptr; HASH_FIND_PTR(_hashForTimers, &target, element); // error here...
Juliet asked April 4th 20 at 00:34
0
answer

Tools for creating animation and particle effects in cocos2d?

Manually register very long. Probably used tools that generate something .plist or .json in TexturePacker, which is already prescribed timestamp and all the effects. Then left to do the import, create the effect from a file. Like this{ "SunExplosion" : { "angleVariance" : 298, "blendFuncDestination" : 1, "blendFuncSource" ...
roberta.Flatley85 asked April 4th 20 at 00:31
0
answer

Adaptive text size?

In css you can do this in many ways, the easiest is to set the size in EM or REM, it is possible to % with calc(). I understand under the hood is the calculation of the scale of the text formula please?)TTFConfig labelConfig; labelConfig.fontFilePath = "fonts/Marker Felt.ttf"; labelConfig.fontSize = 15; thisSessionScoreL...
bernita42 asked April 4th 20 at 00:21
1
answer

Different coordinate systems for events and rendering?

If you put a listener on click and to output coordinates of a clickauto touchListener = EventListenerTouchOneByOne::create(); touchListener->setSwallowTouches(false); touchListener->onTouchBegan = CC_CALLBACK_2(HelloWorldScene::onTouchBegan, this); Director::getInstance()->getEventDispatcher()->addEventListene...
jarrell.Smitham asked April 3rd 20 at 19:04
0
answer

How to get a position DrawNode?

DrawNode* circleInner = DrawNode::create(); circleInner->drawDot( Vec2(100, 100), 55, Color4F::BLUE ); circleInner->setTag(1); this->addChild(circleInner); CCLOG("%d", circleInner->getPositionX()); // 0 CCLOG("%d", circleInner->getPosition()); // 0 CCLOG("%d", circleInner->getPositionNormalized()); /...
lillie.Kuhlman asked April 3rd 20 at 19:03
0
answer

The current version of rendering simple objects?

https://discuss.cocos2d-x.org/t/how-do-i-draw-a-ci... https://stackoverflow.com/questions/25947011/how-t... https://discuss.cocos2d-x.org/t/drawnode-circle-dr... As you can see, more 3 built-in ways of drawing a simple element like a Circle, so what are the most correct? Or what is when to use?
beaulah_Becker asked April 3rd 20 at 19:01