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

Method insertChild

core/2d/Node.cpp:1187–1200  ·  view source on GitHub ↗

helper used by reorderChild & add

Source from the content-addressed store, hash-verified

1185
1186// helper used by reorderChild & add
1187void Node::insertChild(Node* child, int z)
1188{
1189#if AX_ENABLE_GC_FOR_NATIVE_OBJECTS
1190 auto sEngine = ScriptEngineManager::getInstance()->getScriptEngine();
1191 if (sEngine)
1192 {
1193 sEngine->retainScriptObject(this, child);
1194 }
1195#endif // AX_ENABLE_GC_FOR_NATIVE_OBJECTS
1196 _transformUpdated = true;
1197 _reorderChildDirty = true;
1198 _children.pushBack(child);
1199 child->_setLocalZOrder(z);
1200}
1201
1202void Node::reorderChild(Node* child, int zOrder)
1203{

Callers 1

addChildHelperMethod · 0.95

Calls 3

getInstanceFunction · 0.85
pushBackMethod · 0.80
_setLocalZOrderMethod · 0.80

Tested by

no test coverage detected