Beispiel #1
0
void GamePan::addNpc(DB_Actor* pActor)
{
	CCNode* pBaseNode = m_pCcbNode->getChildByTag(kTagGamePanOpp)->getChildByTag(0);
	pBaseNode->removeAllChildren();
	Npc* npc = Npc::create();
	npc->loadCCB(pBaseNode,("scene/actor/"+pActor->resource).c_str());
	pBaseNode->addChild(npc);
	npc->doOpen();
	npc->setPosition(CCPointZero-(npc->getContentSize()/2));
}