本文整理汇总了C++中EHANDLE::GetDebugName方法的典型用法代码示例。如果您正苦于以下问题:C++ EHANDLE::GetDebugName方法的具体用法?C++ EHANDLE::GetDebugName怎么用?C++ EHANDLE::GetDebugName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EHANDLE
的用法示例。
在下文中一共展示了EHANDLE::GetDebugName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Remove
void CASW_DamageAllocationMgr::Remove( const EHANDLE &handle )
{
IndexType_t i = Find( handle );
if ( IsValid(i) )
{
// strike all projectiles for this target
ProjectilePool_t::IndexLocalType_t j = i->m_nProjectiles;
while ( m_ProjectileLists.IsValidIndex(j) )
{
ProjectilePool_t::IndexLocalType_t old = j;
j = m_ProjectileLists.Next(j);
m_ProjectileLists.Remove( old );
}
int vectoridx = i - m_Targets.Base();
Assert( &m_Targets[vectoridx] == i );
m_Targets.FastRemove( vectoridx );
}
else
{
AssertMsg1( false, "Tried to remove %s from a damage allocation manager whence it was absent.\n",
handle->GetDebugName() );
}
}
示例2: DrawDebugTextOverlays
//-----------------------------------------------------------------------------
// Purpose: Draw any debug text overlays
// Output : Current text offset from the top
//-----------------------------------------------------------------------------
int CFuncTank::DrawDebugTextOverlays(void)
{
int text_offset = BaseClass::DrawDebugTextOverlays();
if (m_debugOverlays & OVERLAY_TEXT_BIT)
{
// --------------
// State
// --------------
char tempstr[255];
if (IsActive())
{
Q_strncpy(tempstr,"State: Active",sizeof(tempstr));
}
else
{
Q_strncpy(tempstr,"State: Inactive",sizeof(tempstr));
}
EntityText(text_offset,tempstr,0);
text_offset++;
// -------------------
// Print Firing Speed
// --------------------
Q_snprintf(tempstr,sizeof(tempstr),"Fire Rate: %f",m_fireRate);
EntityText(text_offset,tempstr,0);
text_offset++;
// --------------
// Print Target
// --------------
if (m_hTarget!=NULL)
{
Q_snprintf(tempstr,sizeof(tempstr),"Target: %s",m_hTarget->GetDebugName());
}
else
{
Q_snprintf(tempstr,sizeof(tempstr),"Target: - ");
}
EntityText(text_offset,tempstr,0);
text_offset++;
// --------------
// Target Pos
// --------------
if (m_spawnflags & SF_TANK_AIM_AT_POS)
{
Q_snprintf(tempstr,sizeof(tempstr),"Aim Pos: %3.0f %3.0f %3.0f",m_vTargetPosition.x,m_vTargetPosition.y,m_vTargetPosition.z);
}
else
{
Q_snprintf(tempstr,sizeof(tempstr),"Aim Pos: - ");
}
EntityText(text_offset,tempstr,0);
text_offset++;
}
return text_offset;
}
示例3: DrawDebugTextOverlays
//-----------------------------------------------------------------------------
// Purpose: Draw any debug text overlays
//-----------------------------------------------------------------------------
int CNPC_CombineCamera::DrawDebugTextOverlays(void)
{
int text_offset = BaseClass::DrawDebugTextOverlays();
if (m_debugOverlays & OVERLAY_TEXT_BIT)
{
char tempstr[512];
Q_snprintf( tempstr, sizeof( tempstr ),"Enemy : %s", m_hEnemyTarget ? m_hEnemyTarget->GetDebugName() : "<none>");
EntityText(text_offset,tempstr,0);
text_offset++;
}
return text_offset;
}