NinjaCat* NinjaCat::gameSpriteWithFile(const char* filename) { NinjaCat *cat = new NinjaCat(); if( cat && cat->initWithFile(filename)) { cat->autorelease(); return cat; } CC_SAFE_DELETE(cat); return NULL; }
NinjaCat* NinjaCat::gameSpriteWithFrame(CCSpriteFrame *frame) { NinjaCat *cat = new NinjaCat(); if( cat && cat->initWithSpriteFrame(frame) ) { cat->autorelease(); return cat; } CC_SAFE_DELETE(cat); return NULL; }