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

Method removeAllChildrenWithCleanup

core/2d/SpriteBatchNode.cpp:278–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278void SpriteBatchNode::removeAllChildrenWithCleanup(bool doCleanup)
279{
280 // Invalidate atlas index. issue #569
281 // useSelfRender should be performed on all descendants. issue #1216
282 for (const auto& sprite : _descendants)
283 {
284 sprite->setBatchNode(nullptr);
285 }
286
287 Node::removeAllChildrenWithCleanup(doCleanup);
288
289 _descendants.clear();
290 if (_textureAtlas)
291 {
292 _textureAtlas->removeAllQuads();
293 }
294}
295
296// override sortAllChildren
297void SpriteBatchNode::sortAllChildren()

Callers

nothing calls this directly

Calls 3

removeAllQuadsMethod · 0.80
setBatchNodeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected