CCArray...
Added by t t about 13 years ago
the object-C code is like
NSArray *images = [NSArray arrayWithObjects:
"bird.png", "cat.png",
"dog.png", "turtle.png", nil];
for(int i = 0; i < images.count; ++i) {
NSString *image = [images objectAtIndex:i];
CCSprite *sprite = [CCSprite spriteWithFile:image];
float offsetFraction = ((float)(i+1))/(images.count+1);
sprite.position = ccp(winSize.width*offsetFraction, winSize.height/2);
[self addChild:sprite];
[movableSprites addObject:sprite];
}
how to translate to cocos2d-x (C++) ???
I take too much time to find CCArray with google, so sad - -#
3Q