I have numerous CCNodes that all have the same query run on them. I am trying to stream line the code and am wondering if its possible to get the CCNodes within a FOR statement.
For example if I had the CCNodes references within a NSArray like
NSArray *exampleArray = @[@"Mercedes-Benz", @"BMW", @"Porsche", @"Opel", @"Volkswagen", @"Audi"];
How would I references them within a FOR Statement?
for (int i = 0; i <= 30; i++) {
//Get CCNode reference
}
Is this possible?
If your object are added to some parent easiest would be to:
Within loop you could add condition to check for class of node if you need some constraints.
If you want to create sprites and add them to some parent than you could: