本文整理汇总了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;
}
示例2: GetType
// getCheckpointType(checkpointid)
int CCheckpointModuleNatives::GetType(EntityId checkpointId)
{
CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);
if(pCheckpoint)
{
return pCheckpoint->GetType();
}
return false;
}
示例3: GetRadius
// getCheckpointRadius(checkpointid)
float CCheckpointModuleNatives::GetRadius(EntityId checkpointId)
{
CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);
if(pCheckpoint)
{
return pCheckpoint->GetRadius();
}
return -0.1f;
}
示例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;
}
示例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;
}
示例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;
}
示例7: HideForAll
// hideCheckpointForAll(checkpointid)
bool CCheckpointModuleNatives::HideForAll(EntityId checkpointId)
{
CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);
if(pCheckpoint)
{
pCheckpoint->HideForWorld();
return true;
}
return false;
}
示例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;
}
示例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();
}
示例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;
}