本文整理汇总了C++中Reference::callFunction方法的典型用法代码示例。如果您正苦于以下问题:C++ Reference::callFunction方法的具体用法?C++ Reference::callFunction怎么用?C++ Reference::callFunction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reference
的用法示例。
在下文中一共展示了Reference::callFunction方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkForceStatusCommand
void JediManager::checkForceStatusCommand(CreatureObject* creature) {
Lua* lua = DirectorManager::instance()->getLuaInstance();
Reference<LuaFunction*> luaCheckForceStatusCommand = lua->createFunction(getJediManagerName(), "checkForceStatusCommand", 0);
*luaCheckForceStatusCommand << creature;
luaCheckForceStatusCommand->callFunction();
}
示例2: onPlayerLoggedOut
void JediManager::onPlayerLoggedOut(CreatureObject* creature) {
Lua* lua = DirectorManager::instance()->getLuaInstance();
Reference<LuaFunction*> luaOnPlayerLoggedOut = lua->createFunction(getJediManagerName(), "onPlayerLoggedOut", 0);
*luaOnPlayerLoggedOut << creature;
luaOnPlayerLoggedOut->callFunction();
}
示例3: handleObjectMenuSelect
int TicketCollectorImplementation::handleObjectMenuSelect(CreatureObject* player, byte selectedID) {
if (selectedID == 20) {
player->executeObjectControllerAction(0x5DCD41A2); //boardShuttle
} else if (selectedID == 193 && JediManager::instance()->getJediProgressionType() == JediManager::VILLAGEJEDIPROGRESSION) {
Zone* thisZone = getZone();
if (thisZone == NULL)
return 0;
ManagedReference<PlanetManager*> planetManager = thisZone->getPlanetManager();
if (planetManager == NULL)
return 0;
PlanetTravelPoint* ptp = planetManager->getNearestPlanetTravelPoint(_this.getReferenceUnsafeStaticCast(), 64.f);
if (ptp != NULL && ptp->isInterplanetary()) {
PlayerObject* ghost = player->getPlayerObject();
if (ghost != NULL && ghost->hasActiveQuestBitSet(PlayerQuestData::FS_CRAFTING4_QUEST_03) && !ghost->hasCompletedQuestsBitSet(PlayerQuestData::FS_CRAFTING4_QUEST_03)) {
Lua* lua = DirectorManager::instance()->getLuaInstance();
Reference<LuaFunction*> luaObtainData = lua->createFunction("FsCrafting4", "obtainSatelliteData", 0);
*luaObtainData << player;
*luaObtainData << _this.getReferenceUnsafeStaticCast();
luaObtainData->callFunction();
}
}
}
return 0;
}
示例4: onFSTreeCompleted
void JediManager::onFSTreeCompleted(CreatureObject* creature, String branch) {
Lua* lua = DirectorManager::instance()->getLuaInstance();
Reference<LuaFunction*> luaStartTask = lua->createFunction(getJediManagerName(), "onFSTreeCompleted", 0);
*luaStartTask << creature;
*luaStartTask << branch;
luaStartTask->callFunction();
}
示例5: useItem
void JediManager::useItem(SceneObject* item, const int itemType, CreatureObject* creature) {
Lua* lua = DirectorManager::instance()->getLuaInstance();
Reference<LuaFunction*> luaUseItem = lua->createFunction(getJediManagerName(), "useItem", 0);
*luaUseItem << item;
*luaUseItem << itemType;
*luaUseItem << creature;
luaUseItem->callFunction();
}