当前位置: 首页>>代码示例>>C++>>正文


C++ Reference::callFunction方法代码示例

本文整理汇总了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();
}
开发者ID:Mesagoppinmypants,项目名称:mtgserver,代码行数:7,代码来源:JediManager.cpp

示例2: onPlayerLoggedOut

void JediManager::onPlayerLoggedOut(CreatureObject* creature) {
	Lua* lua = DirectorManager::instance()->getLuaInstance();
	Reference<LuaFunction*> luaOnPlayerLoggedOut = lua->createFunction(getJediManagerName(), "onPlayerLoggedOut", 0);
	*luaOnPlayerLoggedOut << creature;

	luaOnPlayerLoggedOut->callFunction();
}
开发者ID:Mesagoppinmypants,项目名称:mtgserver,代码行数:7,代码来源:JediManager.cpp

示例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;
}
开发者ID:Tatwi,项目名称:legend-of-hondo,代码行数:32,代码来源:TicketCollectorImplementation.cpp

示例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();
}
开发者ID:Mesagoppinmypants,项目名称:mtgserver,代码行数:8,代码来源:JediManager.cpp

示例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();
}
开发者ID:Mesagoppinmypants,项目名称:mtgserver,代码行数:9,代码来源:JediManager.cpp


注:本文中的Reference::callFunction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。