--[[spark_particle = 
{
	animation = "DATA:Animations/marshmallow bud/effects/flame.anim",
	life = 0,
	fade = "none",
	repeat_animation = true,
	
	--scale = Vector2(12,120),

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

SCALE = 0.9
offset = Vector2(102, -62)*SCALE
function UpdatePattern( pattern, time_elapsed, particles, root_position, root_object )
	
	for particle in particles:GetParticles() do
		particle:SetPosition( root_position  + offset)
	end
	
end

first_time = true
function UpdateSpawn( spawner, time_elapsed, particles, root_position, root_object )

	if not spawned then
		spawned = true
		
		local particle = spawner:SpawnParticle( "spark_particle", root_position  + offset)
		particle:SetScale( Vector2(SCALE,SCALE) )
		if World_GetTimeOfDay() == 2 then
			particle:SetModulate( Colour(255,255,155,100) )
		else
			particle:SetModulate( Colour(255,255,155,210) )
		end
	end
	
end

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


Effect = 
{
	FXType = "BudFlame",
	Data = 
	{
		-- 0 is infinity
		life = 0,
		
		BudFlame =
		{
			day = {255, 255, 155, 210},
			sunset = {255, 255, 155, 210},
			night = {255, 255, 155, 100},
			
			offset = {102,-62},
			scale = 0.9
		},
		
		Particles = 
		{
			animation = "DATA:Animations/marshmallow bud/effects/flame.anim",
			life = 0,
			fade = "none",
			repeat_animation = true,
			
			--scale = Vector2(12,120),
		
			--default to background particle
			particle_placement = FXParticle.MIDGROUND
		}

		--sound = "superpig_explode"
	}
}