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


C++ RemoveEffects函数代码示例

本文整理汇总了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 );
}
开发者ID:WorldGamers,项目名称:Mobile-Forces-Source,代码行数:28,代码来源:weapon_flaregun.cpp

示例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() );
}
开发者ID:NicolasDe,项目名称:AlienSwarm,代码行数:31,代码来源:asw_weapon.cpp

示例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);
}
开发者ID:paralin,项目名称:hl2sdk,代码行数:37,代码来源:basecombatweapon.cpp

示例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();
		}
	}
}
开发者ID:jtanx,项目名称:ch1ckenscoop,代码行数:35,代码来源:asw_simple_alien.cpp

示例5: RemoveEffects

void CASW_Queen_Divers::SetVisible(bool bVisible)
{
	if (bVisible)
		RemoveEffects( EF_NODRAW );
	else
		AddEffects( EF_NODRAW );
}
开发者ID:Cre3per,项目名称:hl2sdk-csgo,代码行数:7,代码来源:asw_queen_divers_shared.cpp

示例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();
}
开发者ID:Redbassist,项目名称:FYP,代码行数:9,代码来源:EffectManager.cpp

示例7: RemoveEffects

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void CHL2MP_Player::FlashlightTurnOff( void )
{
	RemoveEffects( EF_DIMLIGHT );
	
	if( IsAlive() )
	{
		EmitSound( "HL2Player.FlashlightOff" );
	}
}
开发者ID:hlstriker,项目名称:source-sdk-2013,代码行数:11,代码来源:hl2mp_player.cpp

示例8: VPhysicsGetObject

void CFuncWallToggle::TurnOn( void )
{
	IPhysicsObject *pPhys = VPhysicsGetObject();
	if ( pPhys )
	{
		pPhys->EnableCollisions( true );
	}
	RemoveSolidFlags( FSOLID_NOT_SOLID );
	RemoveEffects( EF_NODRAW );
}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:10,代码来源:bmodels.cpp

示例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();
}
开发者ID:Entropy-Soldier,项目名称:ges-legacy-code,代码行数:54,代码来源:hl2mp_player.cpp

示例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 );
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:15,代码来源:tf_powerup.cpp

示例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 );
}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:15,代码来源:modelentities.cpp

示例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() );
	}
}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:52,代码来源:hl2_triggers.cpp

示例13: RemoveEffects

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CTeamControlPoint::SetActive( bool active )
{
	m_bActive = active;
	
	if( active )
	{
		RemoveEffects( EF_NODRAW );
	}
	else
	{
		AddEffects( EF_NODRAW );
	}
}
开发者ID:xxauroraxx,项目名称:Source.Python,代码行数:16,代码来源:team_control_point.cpp

示例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 );
}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:17,代码来源:c_asw_aoegrenade_projectile.cpp

示例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 );
	}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:16,代码来源:weapon_dodbase.cpp


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