@riq
You changed it so that Spritesheet sprites are allocated differently now... the CCSpriteSheet class factories up a CCSprite for you with the createSpriteWithRect selector.
The problem with this is that if you want to create any custom sprite behavior, such as your example for the FerrisWheelSprite, using a sprite sheet.... the sprite sheet doesn't know how to create those. :/
You can still do it, but it's a rather ungainly thing relative to how it was done before:
(Assuming sheet is the CCSpriteSheet)
FerrisWheelSprte *wheel = [FerrisWheelSprite spriteWithTexture:sheet.textureAtlas.texture rect:CGRectMake(0, 0, 64, 64)];
[wheel useSpriteSheetRender:sheet];
My first thought is that allocation of this variant of sprite should be as a factory in CCSprite just like the others are to be orthogonal:
+ (id) spriteWithRect:(CGRect)rect SpriteSheet:(CCSpriteSheet)spriteSheet {
CCSprite* s = [CCSprite spriteWithTexture:sheet.textureAtlas.texture rect:rect];
[s useSpriteSheetRender:sheet];
return s;
}
And then.... because the setup of the sprite is a little cumbersome, perhaps a helper method in CCSprite for this so that inherited sprites could easily do the setup without having to understand the internals?
-- David