Example #1
0
void GamePan::addPlayer(DB_Actor* pActor)
{
	CCNode* pBaseNode = m_pCcbNode->getChildByTag(kTagGamePanSelf)->getChildByTag(0);
	pBaseNode->removeAllChildren();
	Player* player = Player::create();
	player->loadCCB(pBaseNode,("scene/actor/"+pActor->resource).c_str());
	pBaseNode->addChild(player);
	player->doOpen();
	player->setPosition(CCPointZero-(player->getContentSize()/2));
}
Example #2
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));
}