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

	return NULL;
}