MCPcopy Create free account
hub / github.com/defold/defold / MoveAllDown

Function MoveAllDown

engine/gameobject/src/gameobject/gameobject.cpp:1760–1778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1758 }
1759
1760 static void MoveAllDown(Collection* collection, Instance* instance)
1761 {
1762 /*
1763 * Move all children down in hierarchy
1764 */
1765
1766 uint32_t index = instance->m_FirstChildIndex;
1767 while (index != INVALID_INSTANCE_INDEX)
1768 {
1769 Instance* child = collection->m_Instances[index];
1770 // NOTE: This assertion is only valid if we processes the tree depth first
1771 // The order of MoveAllUp and MoveUp below is imperative
1772 // NOTE: This assert is not possible when moving more than a single step. TODO: ?
1773 //assert(child->m_Depth == instance->m_Depth + 1);
1774 MoveAllDown(collection, child);
1775 MoveDown(collection, child);
1776 index = collection->m_Instances[index]->m_SiblingIndex;
1777 }
1778 }
1779
1780 static bool InitComponents(Collection* collection, HInstance instance)
1781 {

Callers 1

SetParentFunction · 0.85

Calls 1

MoveDownFunction · 0.85

Tested by

no test coverage detected