Hi,
I need to iterated over various collections and build up a sequence of actions which operate over different targets (using TargetedTouchDelegate code courtesy of Hactar which lets actions run against different targets).
My question is, how could I build up a sequence of actions by iterating, if I dont know the size of the collection and so have to build the sequence on the fly?
Any advice appreciated...
if([self.validRowExpressions count] > 0 || [self.validRowExpressionsRL count] >0 ) {
// start off the sequence of actions we need
for(ExpressionMarkerBoardCoordinate* coord in self.validRowExpressions) {
// We need to create a sequence of actions to blink each cell in this valid row expression
NSMutableArray* columns = [_board objectAtIndex:coord.row_or_col_num];
for(int i = coord.expr1_start; coord<coord.expr2_end;i++) {
BoardPosition* position = [columns objectAtIndex:i];
BlockSprite* piece = position.pieceSprite;
position.state = kBoardPositionMarkedForRemoval; // Mark for later removal
// create a sequence of actions which involve this target
}
}
}
Thanks!!
i