Effect = 
{
	FXType = "NewPuzzlePieceSparkle",
	PlaysWhilePaused = true,
	Data = 
	{
		-- 0 is infinity
		life = 1.5,
		
		NewPuzzlePieceSparkle =
		{
			initial_scale = { 1, 1 },					--initial scaling of particles
			modulate = { 255, 255, 255, 255 },	--particle modulate
			
			rotate = 0.03,			--amount to rotate each frame
			scaling = 0.95,		--amount to scale each frame
			jitter = 100,
			stop_time = 120,
			current_delay = 4,
			delay = 2,
		},
		
		Particles = 
		{
			animation = "DATA:Animations/world/small_collision.anim",
			life = 1,
			fade = "linear",
		
			--default to background particle
			particle_placement = FXParticle.GUIGROUND
		}
	}
}
--[[spark_particle = 
{
	animation = "DATA:Animations/world/small_collision.anim",
	life = 1,
	fade = "linear",

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

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

	for i in particles:GetParticles() do
		
		i:SetScale( i:GetScale()*0.95 )
		i:Rotate( 0.03 )
		
	end

end

DELAY = 4
current_delay = DELAY

JITTER = 100

STOP_TIME = 4*30

function UpdateSpawn( spawner, time_elapsed, particles, root_position, root_object )
	
	if STOP_TIME > 0 then
		STOP_TIME = STOP_TIME - 1
	elseif STOP_TIME == 0 then
		return
	end
	
	if current_delay > 0 then
		current_delay = current_delay - 1
	end
	
	if current_delay == 0 then
		
		current_delay = DELAY
		
		local randx = math.random() - 0.5
		local randy = math.random() - 0.5
		root_position.x = root_position.x + randx*JITTER
		root_position.y = root_position.y + randy*JITTER
		local particle = spawner:SpawnParticle( "spark_particle", root_position )
		
	end
	
end

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