本文整理汇总了C++中RemoveEffects函数的典型用法代码示例。如果您正苦于以下问题:C++ RemoveEffects函数的具体用法?C++ RemoveEffects怎么用?C++ RemoveEffects使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RemoveEffects函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StartBurnSound
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CFlare::Start( float lifeTime )
{
StartBurnSound();
if ( m_pBurnSound != NULL )
{
CSoundEnvelopeController::GetController().Play( m_pBurnSound, 0.0f, 60 );
CSoundEnvelopeController::GetController().SoundChangeVolume( m_pBurnSound, 0.8f, 2.0f );
CSoundEnvelopeController::GetController().SoundChangePitch( m_pBurnSound, 100, 2.0f );
}
if ( lifeTime > 0 )
{
m_flTimeBurnOut = gpGlobals->curtime + lifeTime;
}
else
{
m_flTimeBurnOut = -1.0f;
}
RemoveEffects( EF_NODRAW );
SetThink( &CFlare::FlareThink );
SetNextThink( gpGlobals->curtime + 0.1f );
}
示例2: StopAnimation
//-----------------------------------------------------------------------------
// Purpose: Drop/throw the weapon with the given velocity.
//-----------------------------------------------------------------------------
void CASW_Weapon::Drop( const Vector &vecVelocity )
{
StopAnimation();
StopFollowingEntity( );
SetMoveType( MOVETYPE_FLYGRAVITY );
// clear follow stuff, setup for collision
SetGravity(1.0);
m_iState = WEAPON_NOT_CARRIED;
RemoveEffects( EF_NODRAW );
FallInit();
SetGroundEntity( NULL );
SetTouch(NULL);
IPhysicsObject *pObj = VPhysicsGetObject();
if ( pObj != NULL )
{
AngularImpulse angImp( 200, 200, 200 );
pObj->AddVelocity( &vecVelocity, &angImp );
}
else
{
SetAbsVelocity( vecVelocity );
}
SetNextThink( gpGlobals->curtime + 1.0f );
SetOwnerEntity( NULL );
SetOwner( NULL );
SetModel( GetWorldModel() );
}
示例3: EmitSound
//====================================================================================
// WEAPON SPAWNING
//====================================================================================
//-----------------------------------------------------------------------------
// Purpose: Make a weapon visible and tangible
//-----------------------------------------------------------------------------//
void CBaseCombatWeapon::Materialize( void )
{
if ( IsEffectActive( EF_NODRAW ) )
{
// changing from invisible state to visible.
#ifdef HL2MP
EmitSound( "AlyxEmp.Charge" );
#else
EmitSound( "BaseCombatWeapon.WeaponMaterialize" );
#endif
RemoveEffects( EF_NODRAW );
DoMuzzleFlash();
}
#ifdef HL2MP
if ( HasSpawnFlags( SF_NORESPAWN ) == false )
{
VPhysicsInitNormal( SOLID_BBOX, GetSolidFlags() | FSOLID_TRIGGER, false );
SetMoveType( MOVETYPE_VPHYSICS );
HL2MPRules()->AddLevelDesignerPlacedObject( this );
}
#else
SetSolid( SOLID_BBOX );
AddSolidFlags( FSOLID_TRIGGER );
#endif
SetPickupTouch();
SetThink (NULL);
}
示例4: AddEffects
// todo: turn off collision when asleep?
void CASW_Simple_Alien::SetSleeping(bool bAsleep)
{
if (bAsleep == m_bSleeping)
return;
m_bSleeping = bAsleep;
if (bAsleep)
{
// go asleep
AddEffects( EF_NODRAW );
SetThink( &CASW_Simple_Alien::SleepThink );
SetNextThink( gpGlobals->curtime + 0.1f );
}
else
{
// wake up
RemoveEffects( EF_NODRAW );
SetThink( &CASW_Simple_Alien::AlienThink );
SetNextThink( gpGlobals->curtime + 0.1f );
// set our enemy to the nearest marine
FindNewEnemy();
// if we couldn't see any marines, wake up, but just idle
if (!GetEnemy())
{
SetState(ASW_SIMPLE_ALIEN_IDLING);
}
else
{
AlertSound();
}
}
}
示例5: RemoveEffects
void CASW_Queen_Divers::SetVisible(bool bVisible)
{
if (bVisible)
RemoveEffects( EF_NODRAW );
else
AddEffects( EF_NODRAW );
}
示例6: RemoveEffects
void EffectManager::Draw()
{
sf::Time frameTime = frameClock.restart();
int size = effects.size();
for (int i = 0; i < size; i++) {
effects[i]->DrawEffect(frameTime);
}
RemoveEffects();
}
示例7: RemoveEffects
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void CHL2MP_Player::FlashlightTurnOff( void )
{
RemoveEffects( EF_DIMLIGHT );
if( IsAlive() )
{
EmitSound( "HL2Player.FlashlightOff" );
}
}
示例8: VPhysicsGetObject
void CFuncWallToggle::TurnOn( void )
{
IPhysicsObject *pPhys = VPhysicsGetObject();
if ( pPhys )
{
pPhys->EnableCollisions( true );
}
RemoveSolidFlags( FSOLID_NOT_SOLID );
RemoveEffects( EF_NODRAW );
}
示例9: CreateRagdollEntity
void CHL2MP_Player::Event_Killed( const CTakeDamageInfo &info )
{
//update damage info with our accumulated physics force
CTakeDamageInfo subinfo = info;
subinfo.SetDamageForce( m_vecTotalBulletForce );
#ifdef GE_DLL
// Since we fixed force application, give the ragdoll an extra oomph to emphasize his death
m_vecTotalBulletForce.x *= 2.5f;
m_vecTotalBulletForce.y *= 2.5f;
m_vecTotalBulletForce.z *= 2.0f;
#endif
// Note: since we're dead, it won't draw us on the client, but we don't set EF_NODRAW
// because we still want to transmit to the clients in our PVS.
CreateRagdollEntity();
#ifndef GE_DLL
DetonateTripmines();
#endif
BaseClass::Event_Killed( subinfo );
if ( info.GetDamageType() & DMG_DISSOLVE )
{
if ( m_hRagdoll )
{
m_hRagdoll->GetBaseAnimating()->Dissolve( NULL, gpGlobals->curtime, false, ENTITY_DISSOLVE_NORMAL );
}
}
#ifndef GE_DLL
CBaseEntity *pAttacker = info.GetAttacker();
if ( pAttacker )
{
int iScoreToAdd = 1;
if ( pAttacker == this )
{
iScoreToAdd = -1;
}
GetGlobalTeam( pAttacker->GetTeamNumber() )->AddMatchScore( iScoreToAdd );
}
#endif
FlashlightTurnOff();
m_lifeState = LIFE_DEAD;
RemoveEffects( EF_NODRAW ); // still draw player body
StopZooming();
}
示例10: EmitSound
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CTFPowerup::Materialize( void )
{
if ( !m_bDisabled && IsEffectActive( EF_NODRAW ) )
{
// changing from invisible state to visible.
EmitSound( "Item.Materialize" );
RemoveEffects( EF_NODRAW );
}
m_bRespawning = false;
SetTouch( &CItem::ItemTouch );
}
示例11: RemoveSolidFlags
//-----------------------------------------------------------------------------
// Purpose: Shows the brush.
//-----------------------------------------------------------------------------
void CFuncBrush::TurnOn( void )
{
if ( IsOn() )
return;
if ( m_iSolidity != BRUSHSOLID_NEVER )
{
RemoveSolidFlags( FSOLID_NOT_SOLID );
}
RemoveEffects( EF_NODRAW );
}
示例12: StudioFrameAdvance
void CWateryDeathLeech::LeechThink( void )
{
if ( IsMarkedForDeletion() )
return;
StudioFrameAdvance();
SetNextThink( gpGlobals->curtime + 0.1 );
if ( m_iFadeState != 0 )
{
float dt = gpGlobals->frametime;
if ( dt > 0.1f )
{
dt = 0.1f;
}
m_nRenderMode = kRenderTransTexture;
int speed = max(1,256*dt); // fade out over 1 second
if ( m_iFadeState == -1 )
SetRenderColorA( UTIL_Approach( 0, m_clrRender->a, speed ) );
else
SetRenderColorA( UTIL_Approach( 255, m_clrRender->a, speed ) );
if ( m_clrRender->a == 0 )
{
UTIL_Remove(this);
}
else if ( m_clrRender->a == 255 )
{
m_iFadeState = 0;
}
else
{
SetNextThink( gpGlobals->curtime );
}
}
if ( GetOwnerEntity() )
{
if ( GetOwnerEntity()->GetWaterLevel() < 3 )
{
AddEffects( EF_NODRAW );
}
else
{
RemoveEffects( EF_NODRAW );
}
SetAbsOrigin( GetOwnerEntity()->GetAbsOrigin() + GetOwnerEntity()->GetViewOffset() );
}
}
示例13: RemoveEffects
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CTeamControlPoint::SetActive( bool active )
{
m_bActive = active;
if( active )
{
RemoveEffects( EF_NODRAW );
}
else
{
AddEffects( EF_NODRAW );
}
}
示例14: AddEffects
//-----------------------------------------------------------------------------
// Purpose:
// Input : state -
//-----------------------------------------------------------------------------
void C_ASW_AOEGrenade_Projectile::NotifyShouldTransmit( ShouldTransmitState_t state )
{
if ( state == SHOULDTRANSMIT_END )
{
AddEffects( EF_NODRAW );
}
else if ( state == SHOULDTRANSMIT_START )
{
RemoveEffects( EF_NODRAW );
}
BaseClass::NotifyShouldTransmit( state );
}
示例15: RemoveEffects
//=========================================================
// Materialize - make a CWeaponDODBase visible and tangible
//=========================================================
void CWeaponDODBase::Materialize()
{
if ( IsEffectActive( EF_NODRAW ) )
{
RemoveEffects( EF_NODRAW );
DoMuzzleFlash();
}
AddSolidFlags( FSOLID_TRIGGER );
SetThink (&CWeaponDODBase::SUB_Remove);
SetNextThink( gpGlobals->curtime + 1 );
}