CCWaves3D* CCWaves3D::actionWithWaves(int wav, float amp, const ccGridSize& gridSize, ccTime duration) { CCWaves3D *pAction = new CCWaves3D(); if (pAction) { if (pAction->initWithWaves(wav, amp, gridSize, duration)) { pAction->autorelease(); } else { CC_SAFE_RELEASE_NULL(pAction); } } return pAction; }
NS_CC_BEGIN // implementation of CCWaves3D CCWaves3D* CCWaves3D::create(float duration, const CCSize& gridSize, unsigned int waves, float amplitude) { CCWaves3D *pAction = new CCWaves3D(); if (pAction) { if (pAction->initWithDuration(duration, gridSize, waves, amplitude)) { pAction->autorelease(); } else { CC_SAFE_RELEASE_NULL(pAction); } } return pAction; }