Cocos2D defines the static method 'actions' for the Sequence class as such:
+(id) actions: (FiniteTimeAction *) action1, ... { /* omitted */ }
How could I build a list of actions to perform at run-time, perhaps read from a disk file or such?
I read that the variable length argument list can be translated into a (char *) and passed in that way ...
NSMutableArray *actions = [[NSMutableArray alloc] init];
[actions addObject: [DelayTime actionWithDuration:1]];
[actions addObject: [ScaleBy actionWithDuration:2 scale:4];
char *argList = (char *)malloc(sizeof(FiniteTimeAction *) * [actions count]);
[actions getObjects:(id *)argList];
[self runActions: actions];
Is this the 'best way' or the 'correct' way to do this? Are their better alternatives, faster alternatives?