Thief* Thief::createThief( int hp) { Thief *pRet = new Thief(); if (pRet && pRet->init()) { pRet->setMaxHp(hp); pRet->setCurrHp(hp); pRet->autorelease(); return pRet; } else { delete pRet; pRet = NULL; return NULL; } }
Thief* Thief::createThief(Vector<Node*> points, int hp) { Thief *pRet = new Thief(); if (pRet && pRet->init()) { pRet->setPointsVector(points); pRet->setMaxHp(hp); pRet->setCurrHp(hp); pRet->runFllowPoint(); pRet->autorelease(); return pRet; } else { delete pRet; pRet = NULL; return NULL; } }
Thief* Thief::createThief(/*Vector<Node*> points,*/ int hp) { Thief *pRet = new Thief(); if (pRet && pRet->init()) { // 设置怪物的路径点集 //pRet->setPointsVector(points); pRet->setMaxHp(hp); pRet->setCurrHp(hp); // 让怪物沿着路径点移动 //pRet->runFllowPoint(); pRet->autorelease(); return pRet; } else { delete pRet; pRet = NULL; return NULL; } }