

local time = 0


function EndAnimation()
	AnimationReset()
end



function AnimationReset()
	
	time = 0

end

currentMult = Babylon

function AnimationDo(dt)
	time = time+dt

	local timeScene = 0.0
	if time < 2.5 then
		timeScene = 1.0-ease(time/2.5, 0.2, 0.2)
	else
		timeScene = ease((time-2.5)/2.5, 0.2, 0.2)
	end


	currentMult.Nebo.Nebo.y = lerp(200, 215, timeScene)

	currentMult.Nebo.Rec.x = 250
	currentMult.Nebo.Rec.scale = lerp(1.2, 1.0, timeScene)
	currentMult.Nebo.Rec.y = lerp(-5, 50, timeScene)
	
	currentMult.Nebo.Symbol.x = 254
	currentMult.Nebo.Symbol.scale = lerp(1.4, 1.2, timeScene)
	currentMult.Nebo.Symbol.y = lerp(15, 150, timeScene)+125

	currentMult.Nebo.Cas1.x = lerp(0, 50, timeScene)
	currentMult.Nebo.Cas1.scale = lerp(1.0, 0.9, timeScene)
	currentMult.Nebo.Cas1.y = lerp(210, 220, timeScene)

	currentMult.Nebo.Cas2.x = lerp(490, 440, timeScene)
	currentMult.Nebo.Cas2.scale = lerp(1.0, 0.8, timeScene)
	currentMult.Nebo.Cas2.y = lerp(170, 180, timeScene)

	currentMult.Nebo.O1.x = 300
	currentMult.Nebo.O1.y = lerp(70, 85, timeScene)

	currentMult.Nebo.O2.x = 250
	currentMult.Nebo.O2.y = lerp(20, 35, timeScene)

	currentMult.Nebo.O3.x = 150
	currentMult.Nebo.O3.y = lerp(160, 170, timeScene)

	currentMult.Nebo.R1.x = lerp(100, 115, timeScene)
	currentMult.Nebo.R1.scale = lerp(0.5, 0.45, timeScene)
	currentMult.Nebo.R1.y = lerp(260, 260, timeScene)
	
	currentMult.Effect.Spark1.x = 230
	currentMult.Effect.Spark1.y = 170

	currentMult.Effect.Spark2.x = 210
	currentMult.Effect.Spark2.y = 161
	
	currentMult.Effect.Spark3.x = 210
	currentMult.Effect.Spark3.y = 131

	currentMult.Effect.Spark4.x = 230
	currentMult.Effect.Spark4.y = 119
	
	currentMult.Effect.Spark5.x = 282
	currentMult.Effect.Spark5.y = 119

	currentMult.Effect.Spark6.x = 300
	currentMult.Effect.Spark6.y = 131
	
	currentMult.Effect.Spark7.x = 300
	currentMult.Effect.Spark7.y = 161
	
	currentMult.Effect.Spark8.x = 282
	currentMult.Effect.Spark8.y = 170
	
	currentMult.Effect.Glow.x = 255
	currentMult.Effect.Glow.y = 173
	
	currentMult.Effect.layer.y = lerp(-65, 0, timeScene)
	currentMult.Effect.layer.x = lerp(-50, 0, timeScene)
	currentMult.Effect.layer.scale = lerp(1.2, 1.0, timeScene)



	if time >= 5.0 then
		AnimationReset()
	end

end
