Effect = 
{
	FXType = "GoalShine",
	PlaysWhilePaused = true,
	Data = 
	{
		-- 0 is infinity
		life = 0,
		
		GoalShine =
		{
			step = 0.2,
			current = 0.0,
			float = 0,			--amount to bob up and down
			initial_scale = { 1, 1 },					--initial scaling of particles
			modulate = { 255, 255, 255, 255 },	--particle modulate
			
			rotate = 0.02,			--amount to rotate
			scale = -0.02,			--start by shrinking
			min_scale = 0.7,
			max_scale = 0.95,
		},
		
		Particles = 
		{
			animation = "DATA:Animations/world/puzzle_shard_shine.anim",
			life = 0,
			fade = "linear",
		
			--default to background particle
			particle_placement = FXParticle.MIDGROUND
		}
	}
}
--[[goal = 
{
	animation = "DATA:Animations/world/puzzle_shard_shine.anim",
	life = 0,
	fade = "linear",

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

function UpdatePattern( pattern, time_elapsed, particles, root_position )

end

g_step =  0.2
g_current = 0
g_float = 0
g_start_pos = Vector2()


g_scale =  -0.02 --start by shrinking

g_min_scale = 0.7
g_max_scale = 0.95

function UpdateSpawn( spawner, time_elapsed, particles, root_position )

	if not first_update then
		first_update = true
		g_start_pos = root_position
		spawner:SpawnParticle( "goal", root_position )
		
	end
	
	for particle in particles:GetParticles() do
		if g_step > 0 and g_current > g_float then
			g_step = g_step*-1
		elseif g_step < 0 and g_current < 0 then
			g_step = g_step*-1
		end
		
		local scale = particle:GetScale()
		if g_scale > 0 and scale.x > g_max_scale then
			g_scale = g_scale*-1
		elseif g_scale < 0 and scale.x < g_min_scale then
			g_scale = g_scale*-1
		end
		
		particle:SetScale( scale*(1.0 + g_scale) )
		
		g_current = g_current + g_step
		particle:SetPosition( root_position + Vector2( 0, g_current ) )
		particle:Rotate(0.02)
	end
	
end

Effect = 
{
	FXType = "Custom",
	PlaysWhilePaused = true,
	Data = 
	{
	}
}
]]--