Пример #1
0
Thief* Thief::create(const Vector<Node*>& points)
{
    Thief* pRet = new Thief();
    if(pRet && pRet->init()) {
        pRet->setPointsVector(points);
        pRet->runFllowPoint();
        pRet->autorelease();
    } else {
        delete pRet;
        pRet = nullptr;
    }

    return pRet;
}
Пример #2
0
Thief* Thief::createThief(Vector<Node*> points)
{
    Thief *pRet = new Thief();
    if (pRet && pRet->init())
    {
        pRet->setPointsVector(points);
        pRet->runFllowPoint();
        
        pRet->autorelease();
        return pRet;
    }
    else
    {
        delete pRet;
        pRet = NULL;
        return NULL;
    }
}