本文整理汇总了C++中CBaseCombatCharacter::BloodColor方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseCombatCharacter::BloodColor方法的具体用法?C++ CBaseCombatCharacter::BloodColor怎么用?C++ CBaseCombatCharacter::BloodColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseCombatCharacter
的用法示例。
在下文中一共展示了CBaseCombatCharacter::BloodColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleAnimEvent
//-----------------------------------------------------------------------------
// Purpose: Catch stalker specific messages
// Input :
// Output :
//-----------------------------------------------------------------------------
void CNPC_Stalker::HandleAnimEvent( animevent_t *pEvent )
{
switch( pEvent->Event() )
{
case NPC_EVENT_LEFTFOOT:
{
EmitSound( "NPC_Stalker.FootstepLeft", pEvent->eventtime );
}
break;
case NPC_EVENT_RIGHTFOOT:
{
EmitSound( "NPC_Stalker.FootstepRight", pEvent->eventtime );
}
break;
case STALKER_AE_MELEE_HIT:
{
CBaseEntity *pHurt;
pHurt = CheckTraceHullAttack( 32, Vector(-16,-16,-16), Vector(16,16,16), sk_stalker_melee_dmg.GetFloat(), DMG_SLASH );
if ( pHurt )
{
if ( pHurt->GetFlags() & (FL_NPC|FL_CLIENT) )
{
pHurt->ViewPunch( QAngle( 5, 0, random->RandomInt(-10,10)) );
}
// Spawn some extra blood if we hit a BCC
CBaseCombatCharacter* pBCC = ToBaseCombatCharacter( pHurt );
if (pBCC)
{
SpawnBlood(pBCC->EyePosition(), g_vecAttackDir, pBCC->BloodColor(), sk_stalker_melee_dmg.GetFloat());
}
// Play a attack hit sound
EmitSound( "NPC_Stalker.Hit" );
}
break;
}
default:
BaseClass::HandleAnimEvent( pEvent );
break;
}
}