I’m working on a project which required me to create an CCArray that contains more CCArrays. I’m looking for a way to loop through all objects within the arrays housed inside the root array. I’d like to loop through all 15 objects using CCARRAY_FOREACH. Is this possible?
- rootArray [0] – Contains subArrayA full of 5 objects
- rootArray [1] – Contains subArrayB full of 5 objects
- rootArray [2] – Contains subArrayC full of 5 objects
I’ve used CCARRAY_FOREACH when using a CCSpriteBatchNode by using CCARRAY_FOREACH([batchnode children], object) but how can I use with an array of arrays? I know CCARRAY_FOREACH(rootArray, object) won’t work since it returns the inside arrays and not the objects inside those arrays.
Let me know and sorry if a noob question. :0/
Have you tried this?