您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ EntityText函数代码示例

51自学网 2021-06-01 20:38:27
  C++
这篇教程C++ EntityText函数代码示例写得很实用,希望能帮到您。

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

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

示例1: GetMatchingTeleporter

int CObjectTeleporter::DrawDebugTextOverlays(void) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		CObjectTeleporter *pMatch = GetMatchingTeleporter();		char tempstr[512];		// match		Q_snprintf( tempstr, sizeof( tempstr ), "Match Found: %s", ( pMatch != NULL ) ? "Yes" : "No" );		EntityText(text_offset,tempstr,0);		text_offset++;		// state		Q_snprintf( tempstr, sizeof( tempstr ), "State: %d", m_iState );		EntityText(text_offset,tempstr,0);		text_offset++;		// recharge time		if ( gpGlobals->curtime < m_flRechargeTime )		{			float flPercent = ( m_flRechargeTime - gpGlobals->curtime ) / g_flTeleporterRechargeTimes[ GetUpgradeLevel() - 1 ];			Q_snprintf( tempstr, sizeof( tempstr ), "Recharging: %.1f", flPercent );			EntityText(text_offset,tempstr,0);			text_offset++;		}	}	return text_offset;}
开发者ID:Deathreus,项目名称:TF2Classic,代码行数:32,


示例2: Q_snprintf

//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------int CBaseButton::DrawDebugTextOverlays(){	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		static const char *pszStates[] =		{			"Pressed",			"Unpressed",			"Pressing...",			"Unpressing...",			"<UNKNOWN STATE>",		};			char tempstr[255];		int nState = m_toggle_state;		if ( ( nState < 0 ) || ( nState > 3 ) )		{			nState = 4;		}		Q_snprintf( tempstr, sizeof(tempstr), "State: %s", pszStates[nState] );		EntityText( text_offset, tempstr, 0 );		text_offset++;		Q_snprintf( tempstr, sizeof(tempstr), "%s", m_bLocked ? "Locked" : "Unlocked" );		EntityText( text_offset, tempstr, 0 );		text_offset++;	}	return text_offset;}
开发者ID:xxauroraxx,项目名称:Source.Python,代码行数:35,


示例3: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: Draw any debug text overlays// Returns current text offset from the top//-----------------------------------------------------------------------------int CEnvShake::DrawDebugTextOverlays( void ) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		// print amplitude		Q_snprintf(tempstr,sizeof(tempstr),"    magnitude: %f", m_Amplitude);		EntityText(text_offset,tempstr,0);		text_offset++;		// print frequency		Q_snprintf(tempstr,sizeof(tempstr),"    frequency: %f", m_Frequency);		EntityText(text_offset,tempstr,0);		text_offset++;		// print duration		Q_snprintf(tempstr,sizeof(tempstr),"    duration: %f", m_Duration);		EntityText(text_offset,tempstr,0);		text_offset++;		// print radius		Q_snprintf(tempstr,sizeof(tempstr),"    radius: %f", m_Radius);		EntityText(text_offset,tempstr,0);		text_offset++;	}	return text_offset;}
开发者ID:SizzlingStats,项目名称:hl2sdk-ob-valve,代码行数:35,


示例4: Q_strncpy

//-----------------------------------------------------------------------------// 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,


示例5: IsFacingWithinTolerance

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------int CPointAngleSensor::DrawDebugTextOverlays(void){	int nOffset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		float flDot;		bool bFacing = IsFacingWithinTolerance(m_hTargetEntity, m_hLookAtEntity, m_flDotTolerance, &flDot);		char tempstr[512];		Q_snprintf(tempstr, sizeof(tempstr), "delta ang (dot)    : %.2f (%f)", RAD2DEG(acos(flDot)), flDot);		EntityText( nOffset, tempstr, 0);		nOffset++;		Q_snprintf(tempstr, sizeof(tempstr), "tolerance ang (dot): %.2f (%f)", RAD2DEG(acos(m_flDotTolerance)), m_flDotTolerance);		EntityText( nOffset, tempstr, 0);		nOffset++;		Q_snprintf(tempstr, sizeof(tempstr), "facing: %s", bFacing ? "yes" : "no");		EntityText( nOffset, tempstr, 0);		nOffset++;	}	return nOffset;}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:28,


示例6: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: Draw any debug text overlays// Output : Current text offset from the top//-----------------------------------------------------------------------------int CBreakable::DrawDebugTextOverlays(void) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		if ( GetMaxHealth() )		{			char tempstr[512];			Q_snprintf(tempstr,sizeof(tempstr),"Health: %i",GetHealth());			EntityText(text_offset,tempstr,0);			text_offset++;		}		if ( m_iszBasePropData != NULL_STRING )		{			char tempstr[512];			Q_snprintf(tempstr, sizeof(tempstr),"Base PropData: %s", STRING(m_iszBasePropData) );			EntityText( text_offset, tempstr, 0);			text_offset++;		}	}	return text_offset;}
开发者ID:Biohazard90,项目名称:g-string_2013,代码行数:29,


示例7: Q_strncpy

//-----------------------------------------------------------------------------// Purpose: Draw any debug text overlays// Output : Current text offset from the top//-----------------------------------------------------------------------------int CScriptedTarget::DrawDebugTextOverlays(void) {	// Skip AIClass debug overlays	int text_offset = CBaseEntity::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		// --------------		// Print State		// --------------		char tempstr[512];		if (m_iDisabled) 		{			Q_strncpy(tempstr,"State: Off",sizeof(tempstr));		}		else		{			Q_strncpy(tempstr,"State: On",sizeof(tempstr));		}		EntityText(text_offset,tempstr,0);		text_offset++;		// -----------------		// Print Next Entity		// -----------------		CBaseEntity *pTarget = GetNextTarget();		if (pTarget) 		{			Q_snprintf(tempstr,sizeof(tempstr),"Next: %s",pTarget->GetDebugName() );		}		else		{			Q_strncpy(tempstr,"Next: -NONE-",sizeof(tempstr));		}		EntityText(text_offset,tempstr,0);		text_offset++;		// --------------		// Print Target		// --------------		if (GetTarget()!=NULL) 		{			Q_snprintf(tempstr,sizeof(tempstr),"User: %s",GetTarget()->GetDebugName() );		}		else if (m_iDisabled)		{			Q_strncpy(tempstr,"User: -NONE-",sizeof(tempstr));		}		else 		{			Q_strncpy(tempstr,"User: -LOOKING-",sizeof(tempstr));		}		EntityText(text_offset,tempstr,0);		text_offset++;	}	return text_offset;}
开发者ID:Au-heppa,项目名称:source-sdk-2013,代码行数:61,


示例8: Q_snprintf

int CASW_Simple_Alien::DrawDebugTextOverlays(){	int text_offset = 0;	text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT)	{		char tempstr[512];		// health		Q_snprintf(tempstr,sizeof(tempstr),"Health: %i", m_iHealth );		EntityText(text_offset,tempstr,0);		text_offset++;		// state		static const char *pStateNames[] = { "Idling", "Attacking" };		if ( m_iState < ARRAYSIZE(pStateNames) )		{			Q_snprintf(tempstr,sizeof(tempstr),"State: %s, ", pStateNames[m_iState] );			EntityText(text_offset,tempstr,0);			text_offset++;		}		// enemy		if (GetEnemy())		{			Q_snprintf(tempstr,sizeof(tempstr),"Enemy: %d %s", GetEnemy()->entindex(), GetEnemy()->GetClassname() );			EntityText(text_offset,tempstr,0);			text_offset++;		}		else		{			Q_snprintf(tempstr,sizeof(tempstr),"Enemy: NONE" );			EntityText(text_offset,tempstr,0);			text_offset++;		}		// alien orders		static const char *pOrderNames[] = { "SpreadThenHibernate", "MoveTo", "MoveToIgnoring", "MoveToNearestM", "None" };				if ( (int)m_AlienOrders < ARRAYSIZE(pOrderNames) )		{			Q_snprintf(tempstr,sizeof(tempstr),"Orders: %s, ", pOrderNames[m_iState] );			EntityText(text_offset,tempstr,0);			text_offset++;		}		// moving		Q_snprintf(tempstr,sizeof(tempstr),"Moving: %s, ", m_bMoving ? "Yes" : "No" );		EntityText(text_offset,tempstr,0);		text_offset++;				// sleeping		Q_snprintf(tempstr,sizeof(tempstr),"Sleeping: %s, ", m_bSleeping ? "Yes" : "No" );		EntityText(text_offset,tempstr,0);		text_offset++;		// collision		Q_snprintf(tempstr,sizeof(tempstr),"Col Group: %d, ", GetCollisionGroup());		EntityText(text_offset,tempstr,0);		text_offset++;	}	return text_offset;}
开发者ID:jtanx,项目名称:ch1ckenscoop,代码行数:60,


示例9: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------int CTeamControlPoint::DrawDebugTextOverlays( void ) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[1024];		Q_snprintf(tempstr, sizeof(tempstr), "INDEX: (%d)", GetPointIndex() );		EntityText(text_offset,tempstr,0);		text_offset++;		Q_snprintf( tempstr, sizeof(tempstr), "Red Previous Points: ");		for ( int i = 0; i < MAX_PREVIOUS_POINTS; i++ )		{			if ( m_TeamData[2].iszPreviousPoint[i] != NULL_STRING )			{				Q_strncat( tempstr, STRING(m_TeamData[2].iszPreviousPoint[i]), 1024, COPY_ALL_CHARACTERS );				Q_strncat( tempstr, ", ", 1024, COPY_ALL_CHARACTERS );			}		}		EntityText(text_offset,tempstr,0);		text_offset++;		Q_snprintf( tempstr, sizeof(tempstr), "Blue Previous Points: " );		for ( int i = 0; i < MAX_PREVIOUS_POINTS; i++ )		{			if ( m_TeamData[3].iszPreviousPoint[i] != NULL_STRING )			{				Q_strncat( tempstr, STRING(m_TeamData[3].iszPreviousPoint[i]), 1024, COPY_ALL_CHARACTERS );				Q_strncat( tempstr, ", ", 1024, COPY_ALL_CHARACTERS );			}		}		EntityText(text_offset,tempstr,0);		text_offset++;		for ( int i = 0; i < MAX_CONTROL_POINT_TEAMS; i++ )		{			if ( ObjectiveResource()->GetBaseControlPointForTeam(i) == GetPointIndex() )			{				Q_snprintf(tempstr, sizeof(tempstr), "Base Control Point for Team %d", i );				EntityText(text_offset,tempstr,0);				text_offset++;			}		}	}	return text_offset;}
开发者ID:xxauroraxx,项目名称:Source.Python,代码行数:51,


示例10: DrawDebugGeometryOverlays

	void DrawDebugGeometryOverlays(void) 	{		if (m_debugOverlays & OVERLAY_BBOX_BIT) 		{				if ( m_lastDamage > gpGlobals->curtime && m_flHeatAbsorb > 0 )			{				NDebugOverlay::EntityBounds(this, 88, 255, 128, 0 ,0);				char tempstr[512];				Q_snprintf( tempstr, sizeof(tempstr), "Heat: %.1f", m_flHeatAbsorb );				EntityText(1,tempstr, 0);			}			else if ( !IsBurning() )			{				NDebugOverlay::EntityBounds(this, 88, 88, 128, 0 ,0);			}			if ( IsBurning() )			{				Vector mins, maxs;				if ( GetFireDimensions( &mins, &maxs ) )				{					NDebugOverlay::Box(GetAbsOrigin(), mins, maxs, 128, 0, 0, 10, 0);				}			}		}		BaseClass::DrawDebugGeometryOverlays();	}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:29,


示例11: Q_snprintf

int CDirectorSpawn::DrawDebugTextOverlays(){	int text_offset			= BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char message[512];		Q_snprintf(message, sizeof(message), 			"NPC's creados: %i", 		Childs);		if ( !InGameRules()->IsMultiplayer() )		{			CBasePlayer *pPlayer = UTIL_GetLocalPlayer();			if ( pPlayer )			{				// Calculamos la distancia del creador al jugador.				Vector distToMaker	= GetAbsOrigin() - pPlayer->GetAbsOrigin();				float dist			= VectorNormalize(distToMaker);				Q_snprintf(message, sizeof(message), 					"Distancia: %i", 				dist);			}		}		EntityText(text_offset++, message, 0);	}	return text_offset;}
开发者ID:InfoSmart,项目名称:InSource-Singleplayer,代码行数:32,


示例12: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: Draw any debug text overlays// Output : Current text offset from the top//-----------------------------------------------------------------------------int CRagdollProp::DrawDebugTextOverlays(void) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		if (m_ragdoll.listCount)		{			float mass = 0;			for ( int i = 0; i < m_ragdoll.listCount; i++ )			{				if ( m_ragdoll.list[i].pObject != NULL )				{					mass += m_ragdoll.list[i].pObject->GetMass();				}			}			char tempstr[512];			Q_snprintf(tempstr, sizeof(tempstr),"Mass: %.2f kg / %.2f lb (%s)", mass, kg2lbs(mass), GetMassEquivalent(mass) );			EntityText( text_offset, tempstr, 0);			text_offset++;		}	}	return text_offset;}
开发者ID:paralin,项目名称:hl2sdk,代码行数:30,


示例13: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: Draw any debug text overlays// Input  :// Output : Current text offset from the top//-----------------------------------------------------------------------------int CTFTeamSpawn::DrawDebugTextOverlays(void) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		Q_snprintf(tempstr,sizeof(tempstr),"TeamNumber: %d", GetTeamNumber() );		EntityText(text_offset,tempstr,0);		text_offset++;		color32 teamcolor = g_aTeamColors[ GetTeamNumber() ];		teamcolor.a = 0;		if ( m_bDisabled )		{			Q_snprintf(tempstr,sizeof(tempstr),"DISABLED" );			EntityText(text_offset,tempstr,0);			text_offset++;			teamcolor.a = 255;		}		// Make sure it's empty		Vector mins = g_pGameRules->GetViewVectors()->m_vHullMin;		Vector maxs = g_pGameRules->GetViewVectors()->m_vHullMax;		Vector vTestMins = GetAbsOrigin() + mins;		Vector vTestMaxs = GetAbsOrigin() + maxs;		// First test the starting origin.		if ( UTIL_IsSpaceEmpty( NULL, vTestMins, vTestMaxs ) )		{			NDebugOverlay::Box( GetAbsOrigin(), mins, maxs, teamcolor.r, teamcolor.g, teamcolor.b, teamcolor.a, 0.1);		}		else		{			NDebugOverlay::Box( GetAbsOrigin(), mins, maxs, 0,255,0, 0, 0.1);		}		if ( m_hControlPoint )		{			NDebugOverlay::Line( GetAbsOrigin(), m_hControlPoint->GetAbsOrigin(), teamcolor.r, teamcolor.g, teamcolor.b, false, 0.1 );		}	}	return text_offset;}
开发者ID:TenmaPL,项目名称:TF2Classic,代码行数:52,


示例14: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: Draw any debug text overlays// Output : Current text offset from the top//-----------------------------------------------------------------------------int CNPC_Launcher::DrawDebugTextOverlays(void) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		Q_snprintf(tempstr,sizeof(tempstr),"State: %s", (m_pfnThink) ? "On" : "Off" );		EntityText(text_offset,tempstr,0);		text_offset++;		Q_snprintf(tempstr,sizeof(tempstr),"LOS: %s", (FBitSet (m_spawnflags, SF_LAUNCHER_CHECK_LOS)) ? "On" : "Off" );		EntityText(text_offset,tempstr,0);		text_offset++;	}	return text_offset;}
开发者ID:SizzlingStats,项目名称:hl2sdk-ob-valve,代码行数:21,


示例15: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: Draw any debug text overlays// Output : Current text offset from the top//-----------------------------------------------------------------------------int CFogController::DrawDebugTextOverlays(void) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		Q_snprintf(tempstr,sizeof(tempstr),"State: %s",(m_fog.enable)?"On":"Off");		EntityText(text_offset,tempstr,0);		text_offset++;		Q_snprintf(tempstr,sizeof(tempstr),"Start: %3.0f",m_fog.start.Get());		EntityText(text_offset,tempstr,0);		text_offset++;		Q_snprintf(tempstr,sizeof(tempstr),"End  : %3.0f",m_fog.end.Get());		EntityText(text_offset,tempstr,0);		text_offset++;		color32 color = m_fog.colorPrimary;		Q_snprintf(tempstr,sizeof(tempstr),"1) Red  : %i",color.r);		EntityText(text_offset,tempstr,0);		text_offset++;		Q_snprintf(tempstr,sizeof(tempstr),"1) Green: %i",color.g);		EntityText(text_offset,tempstr,0);		text_offset++;		Q_snprintf(tempstr,sizeof(tempstr),"1) Blue : %i",color.b);		EntityText(text_offset,tempstr,0);		text_offset++;		color = m_fog.colorSecondary;		Q_snprintf(tempstr,sizeof(tempstr),"2) Red  : %i",color.r);		EntityText(text_offset,tempstr,0);		text_offset++;		Q_snprintf(tempstr,sizeof(tempstr),"2) Green: %i",color.g);		EntityText(text_offset,tempstr,0);		text_offset++;		Q_snprintf(tempstr,sizeof(tempstr),"2) Blue : %i",color.b);		EntityText(text_offset,tempstr,0);		text_offset++;	}	return text_offset;}
开发者ID:Au-heppa,项目名称:source-sdk-2013,代码行数:52,


示例16: GetGlobalTeam

//-----------------------------------------------------------------------------------------------------int CFuncNavBlocker::DrawDebugTextOverlays( void ){	int offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		CFmtStr str;		// FIRST_GAME_TEAM skips TEAM_SPECTATOR and TEAM_UNASSIGNED, so we can print		// useful team names in a non-game-specific fashion.		for ( int i=FIRST_GAME_TEAM; i<FIRST_GAME_TEAM + MAX_NAV_TEAMS; ++i )		{			if ( IsBlockingNav( i ) )			{				CTeam *team = GetGlobalTeam( i );				if ( team )				{					EntityText( offset++, str.sprintf( "blocking team %s", team->GetName() ), 0 );				}				else				{					EntityText( offset++, str.sprintf( "blocking team %d", i ), 0 );				}			}		}		NavAreaCollector collector( true );		Extent extent;		extent.Init( this );		TheNavMesh->ForAllAreasOverlappingExtent( collector, extent );		for ( int i=0; i<collector.m_area.Count(); ++i )		{			CNavArea *area = collector.m_area[i];			Extent areaExtent;			area->GetExtent( &areaExtent );			debugoverlay->AddBoxOverlay( vec3_origin, areaExtent.lo, areaExtent.hi, vec3_angle, 0, 255, 0, 10, NDEBUG_PERSIST_TILL_NEXT_SERVER );		}	}	return offset;}
开发者ID:WootsMX,项目名称:InSource,代码行数:43,


示例17: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: Draw any debug text overlays// Output : Current text offset from the top//-----------------------------------------------------------------------------int CEnvFade::DrawDebugTextOverlays( void ) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		// print duration		Q_snprintf(tempstr,sizeof(tempstr),"    duration: %f", m_Duration);		EntityText(text_offset,tempstr,0);		text_offset++;		// print hold time		Q_snprintf(tempstr,sizeof(tempstr),"    hold time: %f", m_HoldTime);		EntityText(text_offset,tempstr,0);		text_offset++;	}	return text_offset;}
开发者ID:Au-heppa,项目名称:source-sdk-2013,代码行数:24,


示例18: Q_snprintf

int CAI_GoalEntity::DrawDebugTextOverlays(){	char tempstr[512];	int offset = BaseClass::DrawDebugTextOverlays();	Q_snprintf( tempstr, sizeof(tempstr), "Active: %s", IsActive() ? "yes" : "no" );	EntityText( offset, tempstr, 0 );	offset++;			return offset;}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:11,


示例19: GetLocalOrigin

//-----------------------------------------------------------------------------// Purpose: Draw any debug text overlays// Output : Current text offset from the top//-----------------------------------------------------------------------------int CFuncMoveLinear::DrawDebugTextOverlays(void) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		float flTravelDist = (m_vecPosition1 - m_vecPosition2).Length();		float flCurDist	   = (m_vecPosition1 - GetLocalOrigin()).Length();		Q_snprintf(tempstr,sizeof(tempstr),"Current Pos: %3.3f",flCurDist/flTravelDist);		EntityText(text_offset,tempstr,0);		text_offset++;		float flTargetDist	   = (m_vecPosition1 - m_vecFinalDest).Length();		Q_snprintf(tempstr,sizeof(tempstr),"Target Pos: %3.3f",flTargetDist/flTravelDist);		EntityText(text_offset,tempstr,0);		text_offset++;	}	return text_offset;}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:24,


示例20: Q_snprintf

//-----------------------------------------------------------------------------// Debug infos//-----------------------------------------------------------------------------int CObjectSentrygun::DrawDebugTextOverlays(void) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		Q_snprintf( tempstr, sizeof( tempstr ), "Level: %d", m_iUpgradeLevel );		EntityText(text_offset,tempstr,0);		text_offset++;		Q_snprintf( tempstr, sizeof( tempstr ), "Shells: %d / %d", m_iAmmoShells, m_iMaxAmmoShells );		EntityText(text_offset,tempstr,0);		text_offset++;		if ( m_iUpgradeLevel == 3 )		{			Q_snprintf( tempstr, sizeof( tempstr ), "Rockets: %d / %d", m_iAmmoRockets, m_iMaxAmmoRockets );			EntityText(text_offset,tempstr,0);			text_offset++;		}		Q_snprintf( tempstr, sizeof( tempstr ), "Upgrade metal %d", m_iUpgradeMetal );		EntityText(text_offset,tempstr,0);		text_offset++;		Vector vecSrc = EyePosition();		Vector forward;		// m_vecCurAngles		AngleVectors( m_vecCurAngles, &forward );		NDebugOverlay::Line( vecSrc, vecSrc + forward * 200, 0, 255, 0, false, 0.1 );		// m_vecGoalAngles		AngleVectors( m_vecGoalAngles, &forward );		NDebugOverlay::Line( vecSrc, vecSrc + forward * 200, 0, 0, 255, false, 0.1 );	}	return text_offset;}
开发者ID:MrBoomer568,项目名称:TF2Classic,代码行数:44,


示例21: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------int CNPC_Crow::DrawDebugTextOverlays( void ){	int nOffset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		Q_snprintf( tempstr, sizeof( tempstr ), "morale: %d", m_nMorale );		EntityText( nOffset, tempstr, 0 );		nOffset++;		if ( GetEnemy() != NULL )		{			Q_snprintf( tempstr, sizeof( tempstr ), "enemy (dist): %s (%g)", GetEnemy()->GetClassname(), ( double )m_flEnemyDist );			EntityText( nOffset, tempstr, 0 );			nOffset++;		}	}	return nOffset;}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:24,


示例22: Q_snprintf

//---------------------------------------------------------//---------------------------------------------------------int CBlobElement::DrawDebugTextOverlays(void) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		Q_snprintf(tempstr,sizeof(tempstr), "Element #:%d", m_iElementNumber );		EntityText(text_offset,tempstr,0);		text_offset++;	}	return text_offset;}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:14,


示例23: Q_snprintf

//---------------------------------------------------------//---------------------------------------------------------int CBounceBomb::DrawDebugTextOverlays(void) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		Q_snprintf(tempstr,sizeof(tempstr), pszMineStateNames[m_iMineState] );		EntityText(text_offset,tempstr,0);		text_offset++;	}	return text_offset;}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:14,


示例24: Think

//-----------------------------------------------------------------------------// Purpose: Think function to move the ghost//-----------------------------------------------------------------------------void GhostEntity::Think( void ){	CBaseAnimating::Think();		if (Q_strlen(m_gName) != 0) {			if (!IsEffectActive(EF_NODRAW)) EntityText(0, m_gName, 0);			updateStep();			HandleGhost();		} else {			EndRun();		}	SetNextThink( gpGlobals->curtime + 0.01f );}
开发者ID:HL2-Ghosting-Team,项目名称:src,代码行数:16,


示例25: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: Draw any debug text overlays.// Output : Returns the new text offset from the top.//-----------------------------------------------------------------------------int CBeam::DrawDebugTextOverlays(void){#if !defined( CLIENT_DLL )	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		// Print state		char tempstr[512];		Q_snprintf(tempstr, sizeof(tempstr), "start: (%.2f,%.2f,%.2f)", GetAbsOrigin().x, GetAbsOrigin().y, GetAbsOrigin().z);		EntityText(text_offset,tempstr,0);		text_offset++;		Q_snprintf(tempstr, sizeof(tempstr), "end  : (%.2f,%.2f,%.2f)", m_vecEndPos.GetX(), m_vecEndPos.GetY(), m_vecEndPos.GetZ());		EntityText(text_offset,tempstr,0);		text_offset++;	}		return text_offset;#else	return 0;#endif}
开发者ID:xxauroraxx,项目名称:Source.Python,代码行数:26,


示例26: Q_snprintf

int CNewRecharge::DrawDebugTextOverlays(void) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		Q_snprintf(tempstr,sizeof(tempstr),"Charge left: %i", m_iJuice );		EntityText(text_offset,tempstr,0);		text_offset++;	}	return text_offset;}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:13,


示例27: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------int CFuncBrush::DrawDebugTextOverlays( void ){	int nOffset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		Q_snprintf( tempstr,sizeof(tempstr), "angles: %g %g %g", (double)GetLocalAngles()[PITCH], (double)GetLocalAngles()[YAW], (double)GetLocalAngles()[ROLL] );		EntityText( nOffset, tempstr, 0 );		nOffset++;	}	return nOffset;}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:17,


示例28: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: Draw any debug text overlays// Output : Current text offset from the top//-----------------------------------------------------------------------------int CEnvExplosion::DrawDebugTextOverlays( void ) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		Q_snprintf(tempstr,sizeof(tempstr),"    magnitude: %i", m_iMagnitude);		EntityText(text_offset,tempstr,0);		text_offset++;	}	return text_offset;}
开发者ID:Entropy-Soldier,项目名称:ges-legacy-code,代码行数:18,


示例29: Q_snprintf

//-----------------------------------------------------------------------------// Purpose: Draw any debug text overlays// Input  :// Output : Current text offset from the top//-----------------------------------------------------------------------------int CFuncRotating::DrawDebugTextOverlays(void) {	int text_offset = BaseClass::DrawDebugTextOverlays();	if (m_debugOverlays & OVERLAY_TEXT_BIT) 	{		char tempstr[512];		Q_snprintf( tempstr, sizeof( tempstr ),"Speed cur (target): %3.2f (%3.2f)", GetMoveSpeed( m_flSpeed ), GetMoveSpeed( m_flTargetSpeed ) );		EntityText(text_offset,tempstr,0);		text_offset++;	}	return text_offset;}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:19,



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


C++ EnumChildWindows函数代码示例
C++ EntityFromEntityHandle函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。