CCFollow* CCFollow::create(CCNode *pFollowedNode, const CCRect& rect/* = CCRectZero*/) { CCFollow *pRet = new CCFollow(); if (pRet && pRet->initWithTarget(pFollowedNode, rect)) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet); return NULL; }
CCFollow *CCFollow::actionWithTarget(CCNode *pFollowedNode) { CCFollow *pRet = new CCFollow(); if (pRet && pRet->initWithTarget(pFollowedNode)) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet) return NULL; }