void ActorFrame::LoadChildrenFromNode( const XNode* pNode ) { // Shouldn't be calling this unless we're going to delete our children. ASSERT( m_bDeleteChildren ); // Load children const XNode* pChildren = pNode->GetChild("children"); bool bArrayOnly = false; if( pChildren == NULL ) { bArrayOnly = true; pChildren = pNode; } FOREACH_CONST_Child( pChildren, pChild ) { if( bArrayOnly && !IsAnInt(pChild->GetName()) ) continue; Actor* pChildActor = ActorUtil::LoadFromNode( pChild, this ); if( pChildActor ) AddChild( pChildActor ); } SortByDrawOrder(); }
void ActorFrame::LoadChildrenFromNode( const CString& sDir, const XNode* pNode ) { // Shoudn't be calling this unless we're going to delete our children. ASSERT( m_bDeleteChildren ); // // Load children // const XNode* pChildren = pNode->GetChild("children"); if( pChildren ) { FOREACH_CONST_Child( pChildren, pChild ) { Actor* pChildActor = ActorUtil::LoadFromActorFile( sDir, pChild ); if( pChildActor ) AddChild( pChildActor ); } SortByDrawOrder(); }