PathStep* PathStep::createWithPosition(Point pos) { PathStep* pPathStepObj = new PathStep(); if(pPathStepObj && pPathStepObj->initWithPosition(pos)){ pPathStepObj->autorelease(); return pPathStepObj; } CC_SAFE_DELETE(pPathStepObj); return nullptr; }
PathStep* PathStep::CreatWithIndex(int row, int col) { PathStep* pRet = new PathStep(); if(pRet) { pRet->InitWithIndex(row, col); pRet->autorelease(); return pRet; } return NULL; }