Hi guys and gals
this question has been annoying me ever since I started playing about with cocos2d:
how do you create a runtime list of "things" in cocos 2D ?
I use the terme things because I encountered this problem in two diffrent places:
1) while creating a menu, we ahve to use
Menu *menu = [Menu menuWithItems: newGameMenuItem, continueGameMenuItem, helpMenuItem, moreMenuItem, nil];
but thats ok because finally I don't need a runtime created menu
2)while creating actions:
id sequence2 = [Sequence actions:sequence1,a1,a2,nil];
[image runAction:sequence2];
this one is annoying me a lot...
I tried sevral things like passing empty id variables, nil, NSArray... but I just can't find a way to create a variable list of actions.
its starting to get vital because I'm writting a function that is of this type
- (id) actionMove:(Directions)direction shouldReverse:(BOOL)reverse;
since there is 8 directions possible x reversed or not (and I have planned to combien this with other effects later on), I just can't possibly imagine having to write all the diffrent sequences one by one, when something like [sequence addAction:...] would do the trick...
does anybody have a solution for this?
thanks
jason rogers