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


C++ EHANDLE::GetDebugName方法代码示例

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

示例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;
}
开发者ID:AgentAgrimar,项目名称:source-sdk-trilogy,代码行数:64,代码来源:hl1_func_tank.cpp

示例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;
}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:17,代码来源:npc_combinecamera.cpp


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