Proper init inheritance of CCSprite

Proper init inheritance of CCSprite
0.0 0


Building subclasses of CCSprite, I would think that we could rely on overriding the base init method and assuming that it would be called by any create or init variation.
Instead, as it stands, we need to override the initWithTexture method that has 3 params. This doesn’t seem very logical to me (subclasses might not actually init with a texture, but they all need to init).

If you look at Cocos2D source, init can be relied on. All init variations make sure the base init method is called.

Seems cleaner in a subclass to just override a generic init method than digging in and figuring out exactly which variation of init is always called and override that one (especially if there could be a chance that one variation might not get called).