Let's say we have a CCSprite object that has an actions tied to it:
-(void) moveJack
{
CCSpriteSheet *sheet = (CCSpriteSheet*)[self getChildByTag:kSheet];
CCSprite *jack = (CCSprite*)[sheet getChildByTag:kJack];
...
CCSequence *seq = [CCSequence actions: jump1, [jump1 reverse], jump2, nil];
[jack runAction:seq];
}
If the sprite crosses over the screen boundary, I would like to display it at opposite side. So, original sprite is half displayed on the right side (for example), and half on the left side, because it has not fully crossed yet. Obviously (or is it), I need 2 sprites to achieve this. One on the right side (original), and one on the left side (a copy). The problem is - I don't know how to create exact copy of the original sprite, because tied actions have scaling and blending transformations (sprite is a bit distorted due to a transformations).
I would like to have something like:
CCSprite *copy = [[jack copy] autorelease];
so that I can add an exact copy to display it on the correct side (and kill it after transition is over). It should be a bitmap with all transformations applied... Is it possible?
Any ideas?