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


C++ CCheckpoint类代码示例

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


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

示例1: sq_getentity

// getCheckpointTargetPosition(checkpointid)
SQInteger CCheckpointNatives::GetTargetPosition(SQVM * pVM)
{
	EntityId checkpointId;
	sq_getentity(pVM, -1, &checkpointId);
	CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);

	if(pCheckpoint)
	{
		CVector3 vecTargetPosition;
		pCheckpoint->GetTargetPosition(vecTargetPosition);
		sq_newtable(pVM);
		sq_pushinteger(pVM, 0);
		sq_pushfloat(pVM, vecTargetPosition.fX);
		sq_createslot(pVM, -3);
		sq_pushinteger(pVM, 1);
		sq_pushfloat(pVM, vecTargetPosition.fY);
		sq_createslot(pVM, -3);
		sq_pushinteger(pVM, 2);
		sq_pushfloat(pVM, vecTargetPosition.fZ);
		sq_createslot(pVM, -3);
		return 1;
	}

	sq_pushbool(pVM, false);
	return 1;
}
开发者ID:AgresivD,项目名称:ivmultiplayer,代码行数:27,代码来源:CheckpointNatives.cpp

示例2: GetType

	// getCheckpointType(checkpointid)
	int CCheckpointModuleNatives::GetType(EntityId checkpointId)
	{
		CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);

		if(pCheckpoint)
		{
			return pCheckpoint->GetType();
		}

		return false;
	}
开发者ID:guilhermelhr,项目名称:ivmultiplayer,代码行数:12,代码来源:CheckpointModuleNatives.cpp

示例3: GetRadius

	// getCheckpointRadius(checkpointid)
	float CCheckpointModuleNatives::GetRadius(EntityId checkpointId)
	{
		CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);

		if(pCheckpoint)
		{
			return pCheckpoint->GetRadius();
		}

		return -0.1f;
	}
开发者ID:guilhermelhr,项目名称:ivmultiplayer,代码行数:12,代码来源:CheckpointModuleNatives.cpp

示例4: SetTargetPosition

	// setCheckpointTargetPosition(checkpointid, targetposition)
	bool CCheckpointModuleNatives::SetTargetPosition(EntityId checkpointId, CVector3 vecTargetPosition)
	{
		CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);

		if(pCheckpoint)
		{
			pCheckpoint->SetTargetPosition(vecTargetPosition);
			return true;
		}

		return false;
	}
开发者ID:guilhermelhr,项目名称:ivmultiplayer,代码行数:13,代码来源:CheckpointModuleNatives.cpp

示例5: SetRadius

	// setCheckpointRadius(checkpointid, radius)
	bool CCheckpointModuleNatives::SetRadius(EntityId checkpointId, float fRadius)
	{
		CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);

		if(pCheckpoint)
		{
			pCheckpoint->SetRadius(fRadius);
			return true;
		}

		return false;
	}
开发者ID:guilhermelhr,项目名称:ivmultiplayer,代码行数:13,代码来源:CheckpointModuleNatives.cpp

示例6: HideForPlayer

	// hideCheckpointForPlayer(checkpointid, playerid)
	bool CCheckpointModuleNatives::HideForPlayer(EntityId checkpointId, EntityId playerId)
	{
		CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);

		if(pCheckpoint)
		{
			pCheckpoint->HideForPlayer(playerId);
			return true;
		}

		return false;
	}
开发者ID:guilhermelhr,项目名称:ivmultiplayer,代码行数:13,代码来源:CheckpointModuleNatives.cpp

示例7: HideForAll

	// hideCheckpointForAll(checkpointid)
	bool CCheckpointModuleNatives::HideForAll(EntityId checkpointId)
	{
		CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);

		if(pCheckpoint)
		{
			pCheckpoint->HideForWorld();
			return true;
		}

		return false;
	}
开发者ID:guilhermelhr,项目名称:ivmultiplayer,代码行数:13,代码来源:CheckpointModuleNatives.cpp

示例8: SetType

	// setCheckpointType(checkpointid, type)
	bool CCheckpointModuleNatives::SetType(EntityId checkpointId, int iType)
	{
		CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);

		if(pCheckpoint)
		{
			pCheckpoint->SetType(iType);
			return true;
		}

		return false;
	}
开发者ID:guilhermelhr,项目名称:ivmultiplayer,代码行数:13,代码来源:CheckpointModuleNatives.cpp

示例9: GetTargetPosition

	// getCheckpointTargetPosition(checkpointid)
	CVector3 CCheckpointModuleNatives::GetTargetPosition(EntityId checkpointId)
	{
		CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);

		if(pCheckpoint)
		{
			CVector3 vecTargetPosition;
			pCheckpoint->GetTargetPosition(vecTargetPosition);
			return vecTargetPosition;
		}

		return CVector3();
	}
开发者ID:guilhermelhr,项目名称:ivmultiplayer,代码行数:14,代码来源:CheckpointModuleNatives.cpp

示例10: sq_getinteger

SQInteger CCheckpointNatives::SetDimension(SQVM * pVM)
{
	SQInteger iDimension;
	EntityId checkpointId;

	sq_getinteger(pVM, -1, &iDimension);
	sq_getentity(pVM, -2, &checkpointId);
	CCheckpoint* pCheckpoint = g_pCheckpointManager->Get(checkpointId);
	if(pCheckpoint) {
		pCheckpoint->SetDimension(iDimension);
		sq_pushbool(pVM, true);
		return 1;
	}
	sq_pushbool(pVM, false);

	return 1;
}
开发者ID:AgresivD,项目名称:ivmultiplayer,代码行数:17,代码来源:CheckpointNatives.cpp


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