Ejemplo n.º 1
0
AStar* AStar::create(int ** map,int width,int height,bool useApproximateDest){
    AStar*  instance = new AStar(map,width,height,useApproximateDest);
    if (instance->init()) {
        return instance;
    }
    return nullptr;
}
Ejemplo n.º 2
0
AStar* AStar::create()
{
	AStar *pRet = new AStar();
	if (pRet && pRet->init())
	{
		pRet->autorelease();
		pRet->retain();
		return pRet;
	}
	else
	{
		delete pRet;
		pRet = NULL;
		return NULL;
	}	
}