Merge pull request #1535 from dumganhar/iss1526-static

issue #1526: Moved implementations of static functions to source files.
This commit is contained in:
James Chen 2012-11-01 19:29:37 -07:00
commit c4a07c7aa6
8 changed files with 376 additions and 200 deletions

View File

@ -738,6 +738,11 @@ CCEaseElastic* CCEaseElastic::actionWithAction(CCActionInterval *pAction, float
return CCEaseElastic::create(pAction, fPeriod);
}
CCEaseElastic* CCEaseElastic::create(CCActionInterval *pAction)
{
return CCEaseElastic::create(pAction, 0.3f);
}
CCEaseElastic* CCEaseElastic::create(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
CCEaseElastic *pRet = new CCEaseElastic();
@ -803,6 +808,11 @@ CCEaseElasticIn* CCEaseElasticIn::actionWithAction(CCActionInterval *pAction, fl
return CCEaseElasticIn::create(pAction, fPeriod);
}
CCEaseElasticIn* CCEaseElasticIn::create(CCActionInterval *pAction)
{
return CCEaseElasticIn::create(pAction, 0.3f);
}
CCEaseElasticIn* CCEaseElasticIn::create(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
CCEaseElasticIn *pRet = new CCEaseElasticIn();
@ -873,6 +883,11 @@ CCEaseElasticOut* CCEaseElasticOut::actionWithAction(CCActionInterval *pAction,
return CCEaseElasticOut::create(pAction, fPeriod);
}
CCEaseElasticOut* CCEaseElasticOut::create(CCActionInterval *pAction)
{
return CCEaseElasticOut::create(pAction, 0.3f);
}
CCEaseElasticOut* CCEaseElasticOut::create(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
CCEaseElasticOut *pRet = new CCEaseElasticOut();
@ -942,6 +957,11 @@ CCEaseElasticInOut* CCEaseElasticInOut::actionWithAction(CCActionInterval *pActi
return CCEaseElasticInOut::create(pAction, fPeriod);
}
CCEaseElasticInOut* CCEaseElasticInOut::create(CCActionInterval *pAction)
{
return CCEaseElasticInOut::create(pAction, 0.3f);
}
CCEaseElasticInOut* CCEaseElasticInOut::create(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
CCEaseElasticInOut *pRet = new CCEaseElasticInOut();

View File

@ -311,9 +311,7 @@ public:
CC_DEPRECATED_ATTRIBUTE static CCEaseElastic* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
/** Creates the action with the inner action and the period in radians (default is 0.3) */
static CCEaseElastic* create(CCActionInterval *pAction, float fPeriod);
static CCEaseElastic* create(CCActionInterval *pAction) {
return CCEaseElastic::create(pAction, 0.3f);
}
static CCEaseElastic* create(CCActionInterval *pAction);
protected:
float m_fPeriod;
};
@ -338,9 +336,7 @@ public:
CC_DEPRECATED_ATTRIBUTE static CCEaseElasticIn* actionWithAction(CCActionInterval *pAction, float fPeriod = 0.3f);
/** Creates the action with the inner action and the period in radians (default is 0.3) */
static CCEaseElasticIn* create(CCActionInterval *pAction, float fPeriod);
static CCEaseElasticIn* create(CCActionInterval *pAction) {
return CCEaseElasticIn::create(pAction, 0.3f);
}
static CCEaseElasticIn* create(CCActionInterval *pAction);
};
/**
@ -364,9 +360,7 @@ public:
/** Creates the action with the inner action and the period in radians (default is 0.3) */
static CCEaseElasticOut* create(CCActionInterval *pAction, float fPeriod);
static CCEaseElasticOut* create(CCActionInterval *pAction) {
return CCEaseElasticOut::create(pAction, 0.3f);
}
static CCEaseElasticOut* create(CCActionInterval *pAction);
};
/**
@ -390,9 +384,7 @@ public:
/** Creates the action with the inner action and the period in radians (default is 0.3) */
static CCEaseElasticInOut* create(CCActionInterval *pAction, float fPeriod);
static CCEaseElasticInOut* create(CCActionInterval *pAction) {
return CCEaseElasticInOut::create(pAction, 0.3f);
}
static CCEaseElasticInOut* create(CCActionInterval *pAction);
};
/**

View File

@ -736,6 +736,21 @@ CCLabelBMFont * CCLabelBMFont::create()
return NULL;
}
CCLabelBMFont * CCLabelBMFont::create(const char *str, const char *fntFile, float width, CCTextAlignment alignment)
{
return CCLabelBMFont::create(str, fntFile, width, alignment, CCPointZero);
}
CCLabelBMFont * CCLabelBMFont::create(const char *str, const char *fntFile, float width)
{
return CCLabelBMFont::create(str, fntFile, width, kCCTextAlignmentLeft, CCPointZero);
}
CCLabelBMFont * CCLabelBMFont::create(const char *str, const char *fntFile)
{
return CCLabelBMFont::create(str, fntFile, kCCLabelAutomaticWidth, kCCTextAlignmentLeft, CCPointZero);
}
CCLabelBMFont *CCLabelBMFont::labelWithString(const char *str, const char *fntFile, float width/* = kCCLabelAutomaticWidth*/, CCTextAlignment alignment/* = kCCTextAlignmentLeft*/, CCPoint imageOffset/* = CCPointZero*/)
{
return CCLabelBMFont::create(str, fntFile, width, alignment, imageOffset);

View File

@ -209,17 +209,11 @@ public:
/** creates a bitmap font atlas with an initial string and the FNT file */
static CCLabelBMFont * create(const char *str, const char *fntFile, float width, CCTextAlignment alignment, CCPoint imageOffset);
static CCLabelBMFont * create(const char *str, const char *fntFile, float width, CCTextAlignment alignment) {
return CCLabelBMFont::create(str, fntFile, width, alignment, CCPointZero);
}
static CCLabelBMFont * create(const char *str, const char *fntFile, float width, CCTextAlignment alignment);
static CCLabelBMFont * create(const char *str, const char *fntFile, float width) {
return CCLabelBMFont::create(str, fntFile, width, kCCTextAlignmentLeft, CCPointZero);
}
static CCLabelBMFont * create(const char *str, const char *fntFile, float width);
static CCLabelBMFont * create(const char *str, const char *fntFile) {
return CCLabelBMFont::create(str, fntFile, kCCLabelAutomaticWidth, kCCTextAlignmentLeft, CCPointZero);
}
static CCLabelBMFont * create(const char *str, const char *fntFile);
/** Creates an label.
@deprecated: This interface will be deprecated sooner or later.

View File

@ -500,6 +500,25 @@ void CCLayerColor::setBlendFunc(ccBlendFunc var)
m_tBlendFunc = var;
}
CCLayerColor* CCLayerColor::node()
{
return CCLayerColor::create();
}
CCLayerColor* CCLayerColor::create()
{
CCLayerColor* pRet = new CCLayerColor();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
CCLayerColor * CCLayerColor::layerWithColor(const ccColor4B& color, GLfloat width, GLfloat height)
{
return CCLayerColor::create(color,width,height);
@ -667,6 +686,25 @@ CCLayerGradient* CCLayerGradient::create(const ccColor4B& start, const ccColor4B
return NULL;
}
CCLayerGradient* CCLayerGradient::node()
{
return CCLayerGradient::create();
}
CCLayerGradient* CCLayerGradient::create()
{
CCLayerGradient* pRet = new CCLayerGradient();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCLayerGradient::init()
{
return initWithColor(ccc4(0, 0, 0, 255), ccc4(0, 0, 0, 255));
@ -869,6 +907,26 @@ CCLayerMultiplex * CCLayerMultiplex::createWithLayer(CCLayer* layer)
return CCLayerMultiplex::create(layer, NULL);
}
CCLayerMultiplex* CCLayerMultiplex::node()
{
return CCLayerMultiplex::create();
}
CCLayerMultiplex* CCLayerMultiplex::create()
{
CCLayerMultiplex* pRet = new CCLayerMultiplex();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
void CCLayerMultiplex::addLayer(CCLayer* layer)
{
CCAssert(m_pLayers, "");

View File

@ -182,6 +182,11 @@ public:
*/
CC_DEPRECATED_ATTRIBUTE static CCLayerColor * layerWithColor(const ccColor4B& color);
//@deprecated: This interface will be deprecated sooner or later.
static CCLayerColor* node();
static CCLayerColor* create();
/** creates a CCLayer with color, width and height in Points */
static CCLayerColor * create(const ccColor4B& color, GLfloat width, GLfloat height);
/** creates a CCLayer with color. Width and height are the window size. */
@ -211,9 +216,8 @@ public:
virtual void setOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);}
virtual bool isOpacityModifyRGB(void) { return false;}
//@deprecated: This interface will be deprecated sooner or later.
CREATE_FUNC(CCLayerColor)
NODE_FUNC(CCLayerColor)
protected:
virtual void updateColor();
};
@ -284,9 +288,11 @@ public:
virtual void setCompressedInterpolation(bool bCompressedInterpolation);
virtual bool isCompressedInterpolation();
// @deprecated: This interface will be deprecated sooner or later.
NODE_FUNC(CCLayerGradient)
CREATE_FUNC(CCLayerGradient)
//@deprecated: This interface will be deprecated sooner or later.
static CCLayerGradient* node();
static CCLayerGradient* create();
protected:
virtual void updateColor();
};
@ -341,9 +347,9 @@ public:
void switchToAndReleaseMe(unsigned int n);
//@deprecated: This interface will be deprecated sooner or later.
NODE_FUNC(CCLayerMultiplex)
CREATE_FUNC(CCLayerMultiplex)
static CCLayerMultiplex* node();
static CCLayerMultiplex* create();
};

View File

@ -32,6 +32,26 @@ NS_CC_BEGIN
//
// ParticleFire
//
CCParticleFire* CCParticleFire::node()
{
return CCParticleFire::create();
}
CCParticleFire* CCParticleFire::create()
{
CCParticleFire* pRet = new CCParticleFire();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCParticleFire::initWithTotalParticles(unsigned int numberOfParticles)
{
if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) )
@ -102,6 +122,25 @@ bool CCParticleFire::initWithTotalParticles(unsigned int numberOfParticles)
//
// ParticleFireworks
//
CCParticleFireworks* CCParticleFireworks::node()
{
return CCParticleFireworks::create();
}
CCParticleFireworks* CCParticleFireworks::create()
{
CCParticleFireworks* pRet = new CCParticleFireworks();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCParticleFireworks::initWithTotalParticles(unsigned int numberOfParticles)
{
if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) )
@ -170,6 +209,26 @@ bool CCParticleFireworks::initWithTotalParticles(unsigned int numberOfParticles)
//
// ParticleSun
//
CCParticleSun* CCParticleSun::node()
{
return CCParticleSun::create();
}
CCParticleSun* CCParticleSun::create()
{
CCParticleSun* pRet = new CCParticleSun();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCParticleSun::initWithTotalParticles(unsigned int numberOfParticles)
{
if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) )
@ -242,6 +301,26 @@ bool CCParticleSun::initWithTotalParticles(unsigned int numberOfParticles)
//
// ParticleGalaxy
//
CCParticleGalaxy* CCParticleGalaxy::node()
{
return CCParticleGalaxy::create();
}
CCParticleGalaxy* CCParticleGalaxy::create()
{
CCParticleGalaxy* pRet = new CCParticleGalaxy();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCParticleGalaxy::initWithTotalParticles(unsigned int numberOfParticles)
{
if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) )
@ -316,6 +395,26 @@ bool CCParticleGalaxy::initWithTotalParticles(unsigned int numberOfParticles)
//
// ParticleFlower
//
CCParticleFlower* CCParticleFlower::node()
{
return CCParticleFlower::create();
}
CCParticleFlower* CCParticleFlower::create()
{
CCParticleFlower* pRet = new CCParticleFlower();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCParticleFlower::initWithTotalParticles(unsigned int numberOfParticles)
{
if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) )
@ -389,6 +488,26 @@ bool CCParticleFlower::initWithTotalParticles(unsigned int numberOfParticles)
//
// ParticleMeteor
//
CCParticleMeteor * CCParticleMeteor::node()
{
return create();
}
CCParticleMeteor * CCParticleMeteor::create()
{
CCParticleMeteor *pRet = new CCParticleMeteor();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCParticleMeteor::initWithTotalParticles(unsigned int numberOfParticles)
{
if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) )
@ -463,6 +582,26 @@ bool CCParticleMeteor::initWithTotalParticles(unsigned int numberOfParticles)
//
// ParticleSpiral
//
CCParticleSpiral* CCParticleSpiral::node()
{
return CCParticleSpiral::create();
}
CCParticleSpiral* CCParticleSpiral::create()
{
CCParticleSpiral* pRet = new CCParticleSpiral();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCParticleSpiral::initWithTotalParticles(unsigned int numberOfParticles)
{
if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) )
@ -537,6 +676,26 @@ bool CCParticleSpiral::initWithTotalParticles(unsigned int numberOfParticles)
//
// ParticleExplosion
//
CCParticleExplosion* CCParticleExplosion::node()
{
return CCParticleExplosion::create();
}
CCParticleExplosion* CCParticleExplosion::create()
{
CCParticleExplosion* pRet = new CCParticleExplosion();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCParticleExplosion::initWithTotalParticles(unsigned int numberOfParticles)
{
if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) )
@ -610,6 +769,26 @@ bool CCParticleExplosion::initWithTotalParticles(unsigned int numberOfParticles)
//
// ParticleSmoke
//
CCParticleSmoke* CCParticleSmoke::node()
{
return CCParticleSmoke::create();
}
CCParticleSmoke* CCParticleSmoke::create()
{
CCParticleSmoke* pRet = new CCParticleSmoke();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCParticleSmoke::initWithTotalParticles(unsigned int numberOfParticles)
{
if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) )
@ -676,9 +855,30 @@ bool CCParticleSmoke::initWithTotalParticles(unsigned int numberOfParticles)
}
return false;
}
//
// CCParticleSnow
//
CCParticleSnow* CCParticleSnow::node()
{
return CCParticleSnow::create();
}
CCParticleSnow* CCParticleSnow::create()
{
CCParticleSnow* pRet = new CCParticleSnow();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCParticleSnow::initWithTotalParticles(unsigned int numberOfParticles)
{
if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) )
@ -752,6 +952,25 @@ bool CCParticleSnow::initWithTotalParticles(unsigned int numberOfParticles)
//
// CCParticleRain
//
CCParticleRain* CCParticleRain::node()
{
return CCParticleRain::create();
}
CCParticleRain* CCParticleRain::create()
{
CCParticleRain* pRet = new CCParticleRain();
if (pRet && pRet->init())
{
pRet->autorelease();
}
else
{
CC_SAFE_DELETE(pRet);
}
return pRet;
}
bool CCParticleRain::initWithTotalParticles(unsigned int numberOfParticles)
{
if( CCParticleSystemQuad::initWithTotalParticles(numberOfParticles) )

View File

@ -43,22 +43,10 @@ public:
virtual ~CCParticleFire(){}
bool init(){ return initWithTotalParticles(250); }
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
static CCParticleFire * node()
{
return create();
}
static CCParticleFire * create()
{
CCParticleFire *pRet = new CCParticleFire();
if (pRet->init())
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
//@deprecated: This interface will be deprecated sooner or later.
CC_DEPRECATED_ATTRIBUTE static CCParticleFire* node();
static CCParticleFire* create();
};
//! @brief A fireworks particle system
@ -69,22 +57,10 @@ public:
virtual ~CCParticleFireworks(){}
bool init(){ return initWithTotalParticles(1500); }
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
static CCParticleFireworks * node()
{
return create();
}
static CCParticleFireworks * create()
{
CCParticleFireworks *pRet = new CCParticleFireworks();
if (pRet->init())
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
//@deprecated: This interface will be deprecated sooner or later.
CC_DEPRECATED_ATTRIBUTE static CCParticleFireworks* node();
static CCParticleFireworks* create();
};
//! @brief A sun particle system
@ -95,21 +71,10 @@ public:
virtual ~CCParticleSun(){}
bool init(){ return initWithTotalParticles(350); }
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
static CCParticleSun * node()
{
return create();
}
static CCParticleSun * create()
{
CCParticleSun *pRet = new CCParticleSun();
if (pRet->init())
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
//@deprecated: This interface will be deprecated sooner or later.
CC_DEPRECATED_ATTRIBUTE static CCParticleSun* node();
static CCParticleSun* create();
};
//! @brief A galaxy particle system
@ -120,22 +85,10 @@ public:
virtual ~CCParticleGalaxy(){}
bool init(){ return initWithTotalParticles(200); }
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
static CCParticleGalaxy * node()
{
return create();
}
static CCParticleGalaxy * create()
{
CCParticleGalaxy *pRet = new CCParticleGalaxy();
if (pRet->init())
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
//@deprecated: This interface will be deprecated sooner or later.
CC_DEPRECATED_ATTRIBUTE static CCParticleGalaxy* node();
static CCParticleGalaxy* create();
};
//! @brief A flower particle system
@ -146,22 +99,10 @@ public:
virtual ~CCParticleFlower(){}
bool init(){ return initWithTotalParticles(250); }
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
static CCParticleFlower * node()
{
return create();
}
static CCParticleFlower * create()
{
CCParticleFlower *pRet = new CCParticleFlower();
if (pRet->init())
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
//@deprecated: This interface will be deprecated sooner or later.
CC_DEPRECATED_ATTRIBUTE static CCParticleFlower* node();
static CCParticleFlower* create();
};
//! @brief A meteor particle system
@ -172,21 +113,8 @@ public:
virtual ~CCParticleMeteor(){}
bool init(){ return initWithTotalParticles(150); }
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
static CCParticleMeteor * node()
{
return create();
}
static CCParticleMeteor * create()
{
CCParticleMeteor *pRet = new CCParticleMeteor();
if (pRet->init())
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
CC_DEPRECATED_ATTRIBUTE static CCParticleMeteor * node();
static CCParticleMeteor * create();
};
//! @brief An spiral particle system
@ -197,21 +125,10 @@ public:
virtual ~CCParticleSpiral(){}
bool init(){ return initWithTotalParticles(500); }
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
static CCParticleSpiral * node()
{
return create();
}
static CCParticleSpiral * create()
{
CCParticleSpiral *pRet = new CCParticleSpiral();
if (pRet->init())
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
//@deprecated: This interface will be deprecated sooner or later.
CC_DEPRECATED_ATTRIBUTE static CCParticleSpiral* node();
static CCParticleSpiral* create();
};
//! @brief An explosion particle system
@ -222,21 +139,10 @@ public:
virtual ~CCParticleExplosion(){}
bool init(){ return initWithTotalParticles(700); }
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
static CCParticleExplosion * node()
{
return create();
}
static CCParticleExplosion * create()
{
CCParticleExplosion *pRet = new CCParticleExplosion();
if (pRet->init())
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
//@deprecated: This interface will be deprecated sooner or later.
CC_DEPRECATED_ATTRIBUTE static CCParticleExplosion* node();
static CCParticleExplosion* create();
};
//! @brief An smoke particle system
@ -247,21 +153,10 @@ public:
virtual ~CCParticleSmoke(){}
bool init(){ return initWithTotalParticles(200); }
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
static CCParticleSmoke * node()
{
return create();
}
static CCParticleSmoke * create()
{
CCParticleSmoke *pRet = new CCParticleSmoke();
if (pRet->init())
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
//@deprecated: This interface will be deprecated sooner or later.
CC_DEPRECATED_ATTRIBUTE static CCParticleSmoke* node();
static CCParticleSmoke* create();
};
//! @brief An snow particle system
@ -272,22 +167,10 @@ public:
virtual ~CCParticleSnow(){}
bool init(){ return initWithTotalParticles(700); }
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
static CCParticleSnow * node()
{
return create();
}
static CCParticleSnow * create()
{
CCParticleSnow *pRet = new CCParticleSnow();
if (pRet->init())
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
//@deprecated: This interface will be deprecated sooner or later.
CC_DEPRECATED_ATTRIBUTE static CCParticleSnow* node();
static CCParticleSnow* create();
};
//! @brief A rain particle system
@ -298,21 +181,10 @@ public:
virtual ~CCParticleRain(){}
bool init(){ return initWithTotalParticles(1000); }
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
static CCParticleRain * node()
{
return create();
}
static CCParticleRain * create()
{
CCParticleRain *pRet = new CCParticleRain();
if (pRet->init())
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
//@deprecated: This interface will be deprecated sooner or later.
CC_DEPRECATED_ATTRIBUTE static CCParticleRain* node();
static CCParticleRain* create();
};
// end of particle_nodes group