Effect = 
{
	FXType = "TutorialArrow",
	
	PlaysWhilePaused = true,
	
	Data = 
	{
		-- 0 is infinity 
		life = 0,
		
		TutorialArrow =
		{
			end_position = {512-70,285},			--the end position of the effect
			displace_speed = 4,							--speed that the particles move towards the end_position
			start_colour = {255, 255, 255, 150},	--the modulate starts at this value and fades to end_colour
			end_colour = {255, 255, 255, 0},		--the modulate starts at this value and fades to end_colour
			fade_speed = 10,								--speed that the modulate goes from start_colour to end_colour
		},
		
		Particles = 
		{
			animation = "DATA:Animations/GUI/tutorial/tutorial_hand_pump.anim",
			life = 0,
			fade = "none",
		
			--default to background particle
			particle_placement = FXParticle.GUIGROUND
		}
	}
}
--[[
spark_particle = 
{
	animation = "DATA:Animations/GUI/tutorial/tutorial_hand_pump.anim",
	life = 0,
	fade = "none",

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

local elapsed = 0

start_position = nil
end_position = Vector2(512-70,285)
speed = 4.0

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

	for i in particles:GetParticles() do
        
		if i:GetPosition().x == end_position.x then
			--fade out
			local modulate = i:GetModulate()
			if modulate.a > 0 then
				modulate.a = modulate.a - 10
				i:SetModulate( modulate )
			else
				i:SetPosition( start_position )
				i:SetModulate( Colour(255,255,255,150) )
			end
		else

			local displace = end_position - i:GetPosition()
			
			if displace:Length() > speed then
				displace:Normalize()
				i:Displace( displace*speed )
			else
				i:SetPosition( end_position )
			end

		end
		
	end

end

function Init( spawner, root_position )

	start_position = root_position
	local particle = spawner:SpawnParticle( "spark_particle", root_position )
	particle:SetModulate( Colour(255,255,255,150) )

end

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

	if not foo then
		foo = 1
		Init( spawner, root_position )
	end
          
end

Effect = 
{
	FXType = "Custom",
	PlaysWhilePaused = true,
	Data = 
	{
		-- 0 is infinity
		life = 0,
		
--		sound = "bang",
		
--		volume = 10.0,
	}
}
--]]