本文整理汇总了C++中CGameManager::getRoom方法的典型用法代码示例。如果您正苦于以下问题:C++ CGameManager::getRoom方法的具体用法?C++ CGameManager::getRoom怎么用?C++ CGameManager::getRoom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGameManager
的用法示例。
在下文中一共展示了CGameManager::getRoom方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
CRoomItem *CPetRemote::getRoom() const {
if (_petControl) {
CGameManager *gameManager = _petControl->getGameManager();
if (gameManager)
return gameManager->getRoom();
}
return nullptr;
}
示例2: summonBot
void CPetControl::summonBot(const CString &name, int val) {
CGameManager *gameManager = getGameManager();
if (gameManager) {
CRoomItem *room = gameManager->getRoom();
if (room) {
CSummonBotMsg summonMsg(name, val);
summonMsg.execute(room);
}
}
}
示例3: canSummonBot
int CPetControl::canSummonBot(const CString &name) {
// If player is the very same view as the NPC, then it's already present
if (isBotInView(name))
return SUMMON_CAN;
// Get the room
CGameManager *gameManager = getGameManager();
if (!gameManager)
return SUMMON_CANT;
CRoomItem *room = gameManager->getRoom();
if (!room)
return SUMMON_CANT;
// Query current room to see whether the bot can be summoned to it
CSummonBotQueryMsg queryMsg(name);
return queryMsg.execute(room) ? SUMMON_CAN : SUMMON_CANT;
}
示例4: MouseButtonUpMsg
bool CRemoteGotoGlyph::MouseButtonUpMsg(const Point &pt) {
if (!_gfxElement || !_gfxElement->MouseButtonUpMsg(pt))
return false;
CPetControl *petControl = getPetControl();
if (petControl) {
CGameManager *gameManager = petControl->getGameManager();
if (gameManager) {
CRoomItem *room = gameManager->getRoom();
if (room) {
CTransportMsg msg(g_vm->_roomNames[_roomIndex], 1, 0);
msg.execute(room);
}
}
}
return true;
}