--[[function UpdatePattern( pattern, time_elapsed, particles, root_position )

end

g_max_speed = 0.1
g_min_speed = 0.02

g_min_scale = 1
g_max_scale = 1.5

g_num_particles = 5

particle_speeds = {}
	
function UpdateSpawn( spawner, time_elapsed, particles, root_position )

	if not first_update then
		first_update = true
		
		local theta = math.pi * 2 / g_num_particles
		local step = theta
		
		while theta <= math.pi * 2 do
			local particle = spawner:SpawnParticle( "goal", root_position )
			particle:Rotate( theta )
			
			theta = theta + step
			
			local scale_speed = math.random()*(g_max_speed - g_min_speed) + g_min_speed
			
			table.insert( particle_speeds, scale_speed )
		end
		
	end
	
	local particle_num = 1
	
	for particle in particles:GetParticles() do
		
		--assert( particle_num <= table.getn( particle_speeds ) )
		
		local scale = particle:GetScale()
		local speed = particle_speeds[ particle_num ]
		
		if speed > 0 and scale.x > g_max_scale then
			particle_speeds[ particle_num ] = speed*-1
		elseif speed < 0 and scale.x < g_min_scale then
			particle_speeds[ particle_num ] = speed*-1
		end
		
		particle:SetScale( scale*(1.0 + speed) )
		
		particle:SetPosition( root_position )
		particle:Rotate(0.03)
		
		particle_num = particle_num + 1
	end
	
end

Effect = 
{
	FXType = "Custom",
	PlaysWhilePaused = true,
	Data = 
	{
		Particles = 
		{
			animation = "DATA:Animations/world/puzzle_piece_shine.anim",
			life = 0,
			fade = "linear",
		
			--default to background particle
			particle_placement = FXParticle.GUIGROUND
		}
	}
}
--]]

Effect = 
{
	FXType = "PuzzlePieceShine",
	PlaysWhilePaused = true,
	Data = 
	{		
		PuzzlePieceShine =
		{
			rotate = 0.03,			--
			max_speed = 0.1,	--
			min_speed = 0.02,	--
			min_scale = 1,			--
			max_scale = 1.5,		--
			num_particles = 5,	--
		},
		
		Particles = 
		{
			animation = "DATA:Animations/world/puzzle_piece_shine.anim",
			life = 0,
			fade = "linear",
		
			--default to background particle
			particle_placement = FXParticle.GUIGROUND
		}
	}
}