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


C++ DataTable::searchColumnString方法代码示例

本文整理汇总了C++中DataTable::searchColumnString方法的典型用法代码示例。如果您正苦于以下问题:C++ DataTable::searchColumnString方法的具体用法?C++ DataTable::searchColumnString怎么用?C++ DataTable::searchColumnString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataTable的用法示例。


在下文中一共展示了DataTable::searchColumnString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

const char *CombatTimingTable::getWeaponReloadClientAnimation(std::string const & weaponType)
{
	const char * result = 0;

	DataTable * combatTimingTable = DataTableManager::getTable(cs_combatTimingTableName, true);
	if (combatTimingTable)
	{
		int rowNum = combatTimingTable->searchColumnString(0, weaponType);
		result = combatTimingTable->getStringValue("WeaponReloadClientAnimation", rowNum);
	}

	return result;
}
开发者ID:Mesagoppinmypants,项目名称:NGELinux,代码行数:13,代码来源:CombatTimingTable.cpp

示例2: isContinuous

bool CombatTimingTable::isContinuous(std::string const & weaponType)
{
	bool result = false;

	DataTable * combatTimingTable = DataTableManager::getTable(cs_combatTimingTableName, true);
	if (combatTimingTable)
	{
		int rowNum = combatTimingTable->searchColumnString(0, weaponType);
		result = combatTimingTable->getIntValue("Continuous", rowNum) ? true : false;
	}

	return result;
}
开发者ID:Mesagoppinmypants,项目名称:NGELinux,代码行数:13,代码来源:CombatTimingTable.cpp

示例3: getWeaponReloadTimeSeconds

float CombatTimingTable::getWeaponReloadTimeSeconds(std::string const & weaponType)
{
	float result = 0;

	DataTable * combatTimingTable = DataTableManager::getTable(cs_combatTimingTableName, true);
	if (combatTimingTable)
	{
		int rowNum = combatTimingTable->searchColumnString(0, weaponType);
		result = combatTimingTable->getFloatValue("WeaponReloadTimeSeconds", rowNum);
	}

	return result;
}
开发者ID:Mesagoppinmypants,项目名称:NGELinux,代码行数:13,代码来源:CombatTimingTable.cpp

示例4: getMaximumShotsTillWeaponReload

int CombatTimingTable::getMaximumShotsTillWeaponReload(std::string const & weaponType)
{
	int result = 0;

	DataTable * combatTimingTable = DataTableManager::getTable(cs_combatTimingTableName, true);
	if (combatTimingTable)
	{
		int rowNum = combatTimingTable->searchColumnString(0, weaponType);
		result = combatTimingTable->getIntValue("MaximumShotsTillWeaponReload", rowNum);
	}

	return result;
}
开发者ID:Mesagoppinmypants,项目名称:NGELinux,代码行数:13,代码来源:CombatTimingTable.cpp

示例5: changeTeleportDestination

void BuildingObject::changeTeleportDestination(Vector & position, float & yaw) const
{
	if (!isAuthoritative())
	{
		WARNING(true, ("BuildingObject::changeTeleportDestination called on "
			"non-authoritative building %s", getNetworkId().getValueString().c_str()));
		return;
	}

	// call a script trigger that will give us the index of the cloning facility
	// tube to respawn in, if any
	int index = -1;
	ScriptParams params;
	params.addParam(index);
	IGNORE_RETURN(const_cast<GameScriptObject *>(getScriptObject())->trigAllScripts(
		Scripting::TRIG_GET_RESPAWN_LOC, params));
	index = params.getIntParam(0);
	if (index >= 0)
	{
		DataTable * respawnTable = DataTableManager::getTable(CLONE_RESPAWN_TABLE, 
			true);
		if (respawnTable != NULL)
		{
			int row = respawnTable->searchColumnString(0, getTemplateName());
			if (row >= 0)
			{
				char buffer[32];
				sprintf(buffer, "TUBE%d_X", index+1);
				int column = respawnTable->findColumnNumber(buffer);
				if (column >= 0)
				{
					position.x = respawnTable->getFloatValue(column, row);
					position.z = respawnTable->getFloatValue(column+1, row);
					yaw = convertDegreesToRadians(respawnTable->getFloatValue(column+2, row));
				}
			}
		}
	}
}
开发者ID:Mesagoppinmypants,项目名称:NGELinux,代码行数:39,代码来源:BuildingObject.cpp


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