--[[spark_particle = 
{
	animation = "DATA:Animations/GUI/trophy/goodie_powar.anim",
	life = 4.5,
	fade = "linear",

	--default to background particle
	particle_placement = FXParticle.GUIGROUND
}

RADIUS = 150

elapsed_time = 0
pattern_step = 0

function UpdatePattern( pattern, time_elapsed, particles, root_position, root_object )

	local step = 0
	
	for i in particles:GetParticles() do
          
		step = step + 1
		--[[step = step + 0.1
		
		local theta = step * 2 * 3.14159
		local x = math.cos( theta ) * RADIUS
		local y = math.sin( theta ) * RADIUS
		
		local pos = Vector2( root_position.x + x, root_position.y + y )
		i:SetPosition( pos )]]
		if step == 1 then
			i:Rotate( -0.01 )
		else
			i:Rotate( -0.015 )
		end
		
	end

end

function UpdateSpawn( spawner, time_elapsed, particles, root_position, root_object )

	if not spawned then
	
		spawned = true
		local step = 0 
		
--[[		while step < 2 * 3.14159 do
			step = step + 0.1
			
			local theta = step * 2 * 3.14159
			local x = math.cos( theta ) * RADIUS
			local y = math.sin( theta ) * RADIUS
			
			local pos = Vector2( root_position.x + x, root_position.y + y )
			local particle = spawner:SpawnParticle( "spark_particle", pos )
			
			--particle:SetScale( Vector2(0.5,0.5) )
		end]]
		
		spawner:SpawnParticle( "spark_particle", root_position)
		local particle = spawner:SpawnParticle( "spark_particle", root_position)
		particle:SetScale(Vector2(1.3,1.3))
		
	end
	
end

Effect = 
{
	FXType = "Custom",
	PlaysWhilePaused = true,
	Data = 
	{
		-- 0 is infinity
		life = 5.5,
	}
}--]]

Effect = 
{
	FXType = "TrophySparkles",
	PlaysWhilePaused = true,
	Data = 
	{
		sound = "Power Baby",
		
		life = 0,
		
		TrophySparkles =
		{
			{
				rotate= -0.01,									--amount to rotate per frame for first particle
				initial_scale = { 1.3, 1.3 },						--initial scaling of first particle
				scaling_factor = 1,							--scaling factor for first particle per frame
				modulate = { 255, 255, 255, 200 },		--first particle modulate
			},
			{
				rotate= -0.015,								--amount to rotate per frame for second particle
				initial_scale = { 1.6, 1.6 },				--initial scaling of second particle
				scaling_factor = 1,							--scaling factor for second particle per frame
				modulate = { 255, 255, 255, 200 },		--second particle modulate
			},
		},
		
		Particles = 
		{
			animation = "DATA:Animations/GUI/trophy/goodie_powar.anim",
			life = 0,
			fade = "none",
			--default to background particle
			particle_placement = FXParticle.GUIGROUND
		}
	}
}