CCMotionStreak * CCMotionStreak::streakWithFade(float fade, float seg, StreamSource* source, float width, float length, const ccColor4B& color) { CCMotionStreak *pRet = new CCMotionStreak(); if(pRet && pRet->initWithFade(fade, seg, source, width, length, color)) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet) return NULL; }
CCMotionStreak* CCMotionStreakCreator::createNode() { CCMotionStreak* pProgressTimer = new CCMotionStreak(); if(pProgressTimer) { pProgressTimer->autorelease(); return pProgressTimer; } CC_SAFE_DELETE(pProgressTimer); return NULL; }
CCMotionStreak* CCMotionStreak::create(float fade, float minSeg, float stroke, ccColor3B color, CCTexture2D* texture) { CCMotionStreak *pRet = new CCMotionStreak(); if (pRet && pRet->initWithFade(fade, minSeg, stroke, color, texture)) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet); return NULL; }