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

end

g_has_rotated = false
g_wait = 3
g_growth = 1.3
g_growth_speed = 0.08
g_shrink_speed = -0.12
g_shrink = 0.2
g_has_grown = false

function UpdateSpawn( spawner, time_elapsed, particles, root_position )

	if not first_update then
		first_update = true
		
		local particle = spawner:SpawnParticle( "goal", root_position )
		
	end
	
	for particle in particles:GetParticles() do

		if not g_has_rotated then
		
			particle:Rotate( -math.pi/5 )
			
			if particle:GetFacing().x == 1 then
				g_has_rotated = true
			end
			
		else
		
			if g_wait > 0 then
				g_wait = g_wait - 1
			else
				
				local scale = particle:GetScale()
				
				if scale.x < g_growth and not g_has_grown then
					particle:SetScale( Vector2( scale.x + g_growth_speed, scale.y + g_growth_speed ) )
				else
					g_has_grown = true
					particle:SetScale( Vector2( scale.x + g_shrink_speed, scale.y + g_shrink_speed ) )
					
					if scale.x <= g_shrink then
					
						particle:SetModulate( Colour(0,0,0,0) )
					
					end
					
				end
				
			end
		
		end
		
	end
	
end

Effect = 
{
	FXType = "Custom",
	Data = 
	{
		life = 1.2,
		
		Particles = 
		{
			animation = "DATA:Animations/merch/effects/cha-ching.anim",
			life = 1.2,
			fade = "none",
		
			--default to background particle
			particle_placement = FXParticle.FOREGROUND
		}
	}
}
--]]
Effect = 
{
	FXType = "ChaChing",
	Data = 
	{
		-- 0 is infinity
		life = 1.2,
		
		ChaChing =
		{
			wait = 3,					--number of frames to wait
			growth = 1.3,				--
			growth_speed = 0.08,	--
			shrink = 0.2,				--
			shrink_speed = -0.12,	--
		},
		
		Particles = 
		{
			animation = "DATA:Animations/merch/effects/cha-ching.anim",
			life = 1.2,
			fade = "none",
		
			--default to background particle
			particle_placement = FXParticle.FOREGROUND
		}
	}
}
