コード例 #1
0
//-----------------------------------------------------------------------------
// Purpose: 
// Input  : position - 
//			force - 
// Output : virtual void
//-----------------------------------------------------------------------------
void C_BaseExplosionEffect::Create( const Vector &position, float force, float scale, int flags )
{
	m_vecOrigin = position;
	m_fFlags	= flags;

	//Find the force of the explosion
	GetForceDirection( m_vecOrigin, force, &m_vecDirection, &m_flForce );

#if __EXPLOSION_DEBUG
	debugoverlay->AddBoxOverlay( m_vecOrigin, -Vector(32,32,32), Vector(32,32,32), vec3_angle, 255, 0, 0, 64, 5.0f );
	debugoverlay->AddLineOverlay( m_vecOrigin, m_vecOrigin+(m_vecDirection*force*m_flForce), 0, 0, 255, false, 3 );
#endif

	PlaySound();

	if ( scale != 0 )
	{
		// UNDONE: Make core size parametric to scale or remove scale?
		CreateCore();
	}

	CreateDebris();
	//FIXME: CreateDynamicLight();
	CreateMisc();
}
コード例 #2
0
ファイル: Application.cpp プロジェクト: Taka03/Camerun2
//=============================================================================
//起動
//=============================================================================
void CApplication::Run()
{
	//コアの生成
	CreateCore();
	
	//初期化処理
	CCommonObject::Initialize();
	
	CGame Game;
	
	/*初期化*/
	if( m_pCore->Initialize( m_strAppName.c_str() , FRAME_RATE_60 ) )
	{
		Initialize();
		
		while( GetCore()->Run() )
		{
			Game.Run();
		}
		
	}
	
	//終了処理
	CCommonObject::Finalize();
	

}
コード例 #3
0
//-----------------------------------------------------------------------------
// Purpose: 
// Input  : position - 
//			force - 
// Output : virtual void
//-----------------------------------------------------------------------------
void C_BaseExplosionEffect::Create( const Vector &position, float force, float scale, int flags )
{
	m_vecOrigin = position;
	m_fFlags	= flags;

	//if explosion is an ice explosion skip all the other stuff and draw a particle system
	if ( m_fFlags & TE_EXPLFLAG_ICE )
	{
		QAngle	vecAngles;
		//DispatchParticleEffect( "freeze_explosion", m_vecOrigin , vecAngles );
		PlaySound();
		return;
	}

	if ( m_fFlags & TE_EXPLFLAG_SCALEPARTICLES )
	{
		m_flScale = scale;
	}
	else
	{
		m_flScale = 1.0f;
	}

	//Find the force of the explosion
	GetForceDirection( m_vecOrigin, force, &m_vecDirection, &m_flForce );

#if __EXPLOSION_DEBUG
	debugoverlay->AddBoxOverlay( m_vecOrigin, -Vector(32,32,32), Vector(32,32,32), vec3_angle, 255, 0, 0, 64, 5.0f );
	debugoverlay->AddLineOverlay( m_vecOrigin, m_vecOrigin+(m_vecDirection*force*m_flForce), 0, 0, 255, false, 3 );
#endif

	PlaySound();

	if ( scale != 0 )
	{
		// UNDONE: Make core size parametric to scale or remove scale?
		CreateCore();
	}

	CreateDebris();
	CreateDynamicLight();
	CreateMisc();
}