本文整理汇总了C++中CBaseTFPlayer::HasNamedTechnology方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseTFPlayer::HasNamedTechnology方法的具体用法?C++ CBaseTFPlayer::HasNamedTechnology怎么用?C++ CBaseTFPlayer::HasNamedTechnology使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseTFPlayer
的用法示例。
在下文中一共展示了CBaseTFPlayer::HasNamedTechnology方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GainedNewTechnology
//-----------------------------------------------------------------------------
// New technologies:
//-----------------------------------------------------------------------------
void CWeaponCombat_ChargeablePlasma::GainedNewTechnology( CBaseTechnology *pTechnology )
{
BaseClass::GainedNewTechnology( pTechnology );
CBaseTFPlayer *pPlayer = ToBaseTFPlayer( (CBaseEntity*)GetOwner() );
if ( pPlayer )
{
// Charge-up mode?
if ( pPlayer->HasNamedTechnology( "com_comboshield_charge" ) )
{
m_bHasCharge = true;
}
else
{
m_bHasCharge = false;
}
// Burst shot mode?
if ( pPlayer->HasNamedTechnology( "com_comboshield_tripleshot" ) )
{
m_bHasBurstShot = true;
}
else
{
m_bHasBurstShot = false;
}
}
}
示例2: GainedNewTechnology
//-----------------------------------------------------------------------------
// Purpose: The player holding this weapon has just gained new technology.
// Check to see if it affects the mortar
//-----------------------------------------------------------------------------
void CWeaponMortar::GainedNewTechnology( CBaseTechnology *pTechnology )
{
CBaseTFPlayer *pPlayer = ToBaseTFPlayer( GetOwner() );
if ( pPlayer )
{
// Range upgraded?
if ( pPlayer->HasNamedTechnology("mortar_range") )
m_bRangeUpgraded = true;
else
m_bRangeUpgraded = false;
// Accuracy upgraded?
if ( pPlayer->HasNamedTechnology("mortar_accuracy") )
m_bAccuracyUpgraded = true;
else
m_bAccuracyUpgraded = false;
}
}
示例3: SetRoundType
//-----------------------------------------------------------------------------
// Purpose: Set the deployed mortar's firing round
//-----------------------------------------------------------------------------
void CWeaponMortar::SetRoundType( int iRoundType )
{
if ( m_hDeployedMortar == NULL )
return;
// Make sure we've got the technology for this round type
if ( MortarAmmoTechs[ iRoundType ] && MortarAmmoTechs[ iRoundType ][0] )
{
CBaseTFPlayer *pPlayer = ToBaseTFPlayer( GetOwner() );
if ( !pPlayer )
return;
// Does the player have the technology?
if ( pPlayer->HasNamedTechnology( MortarAmmoTechs[ iRoundType ] ) == false )
return;
}
m_hDeployedMortar->m_iRoundType = iRoundType;
}
示例4: GainedNewTechnology
//-----------------------------------------------------------------------------
// Purpose: The player holding this weapon has just gained new technology.
//-----------------------------------------------------------------------------
void CWeaponCombatShield::GainedNewTechnology( CBaseTechnology *pTechnology )
{
BaseClass::GainedNewTechnology( pTechnology );
CBaseTFPlayer *pPlayer = ToBaseTFPlayer( GetOwner() );
if ( pPlayer )
{
// Has a parry?
if ( pPlayer->HasNamedTechnology( "com_comboshield_parry" ) )
{
m_bHasShieldParry = true;
}
else
{
m_bHasShieldParry = false;
}
}
}