Iterate through CCLayer

Iterate through CCLayer
0.0 0


Hey guys how do you iterate all CCSprite or Custom Class Objects from CCLayer children?


You can invoke getChildren() and iterate the return value.


I see, going deeper with my question, how can I get all specific type of children (let’s say a group of CCSprite) of a layer and pass it into CCMutableArray<CCSprite*>* ?


After pondering in the room of knowledge and wisdom I have figured my dilemma.
For anyone interested look for this thread and look up dynamic_cast