| 276 | } |
| 277 | |
| 278 | void 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 |
| 297 | void SpriteBatchNode::sortAllChildren() |
nothing calls this directly
no test coverage detected