MCPcopy Create free account
hub / github.com/axmolengine/axmol / removeAndAddSprite

Method removeAndAddSprite

tests/cpp-tests/Source/SpriteTest/SpriteTest.cpp:353–362  ·  view source on GitHub ↗

this function test if remove and add works as expected: color array and vertex array should be reindexed

Source from the content-addressed store, hash-verified

351// this function test if remove and add works as expected:
352// color array and vertex array should be reindexed
353void SpriteColorOpacity::removeAndAddSprite(float dt)
354{
355 auto sprite = static_cast<Sprite*>(getChildByTag(kTagSprite5));
356 sprite->retain();
357
358 removeChild(sprite, false);
359 addChild(sprite, 0, kTagSprite5);
360
361 sprite->release();
362}
363
364std::string SpriteColorOpacity::title() const
365{

Callers

nothing calls this directly

Calls 6

getChildByTagFunction · 0.85
retainMethod · 0.45
releaseMethod · 0.45
getChildByTagMethod · 0.45
removeChildMethod · 0.45
addChildMethod · 0.45

Tested by

no test coverage detected