cocos2d-x 자식 노드 순차로 순회하기

CCArray *pChildren = this->getChildren();

if (pChildren && pChildren->count() > 0)
{
CCObject* pObject = NULL;
int nCnt = 0;
CCARRAY_FOREACH(pChildren, pObject)
{
UILobbyUserHouse* pChild = (UILobbyUserHouse*) pObject;
pChild->setPosition( ccp(nCnt* 100, nCnt*100) );
nCnt++;
}
}

+ Recent posts