void PopUpCreator::classTutorial() { ostringstream line; line << "Classes:\n"; Wizard w; line << " Wizard:\n"; vector<Skill*> skills = w.getSkills(); for (unsigned int i = 0; i < skills.size(); i++) { line << " " << skills[i]->name() << ": " << skills[i]->description() << endl; } line << endl; Paladin p; line << " Paladin:\n"; skills = p.getSkills(); for (unsigned int i = 0; i < skills.size(); i++) { line << " " << skills[i]->name() << ": " << skills[i]->description() << endl; } line << endl; Thief t; line << " Thief:\n"; skills = t.getSkills(); for (unsigned int i = 0; i < skills.size(); i++) { line << " " << skills[i]->name() << ": " << skills[i]->description() << endl; } PopUp::make(line.str()); }
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; }
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; } }
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; } }