local dttX = 270
local dttY = 175

function Effects06 ( timeScene )	
	currentMult.Effect06.Altar.x = 250
	currentMult.Effect06.Altar.y = 230
end

function Visual_6 (timeScene, Relax, Destroid, Pause)					   	
	if timeScene <= 1 - Destroid-Pause then   						
		local T = ease(timeScene/(1 - Destroid-Pause), 0, Relax)						   		
		
		currentMult.Scene6.BranchLeft.x = lerp(50, -1000, T)
		currentMult.Scene6.BranchLeft.y = lerp(50, -1000, T)
		currentMult.Scene6.BranchLeft.scale = 1
		
		currentMult.Scene6.BranchRight01.x = lerp(450, 1200, T)
		currentMult.Scene6.BranchRight01.y = lerp(50, -1000, T)
		currentMult.Scene6.BranchRight01.scale = 1
		
		currentMult.Scene6.BranchRight02.x = lerp(450, 1240,  T)
		currentMult.Scene6.BranchRight02.y = lerp(30, -1300, T)
		currentMult.Scene6.BranchRight02.scale = 1
		
		currentMult.Scene6.LeftTree.x = lerp(291, 80,  T)
		currentMult.Scene6.LeftTree.y = lerp(182, 300,  T)
		currentMult.Scene6.LeftTree.scale = lerp(1, 1.2,  T)
		
		currentMult.Scene6.RightTree.x = lerp(239, 400,  T)
		currentMult.Scene6.RightTree.y = lerp(182, 300,  T)
		currentMult.Scene6.RightTree.scale = lerp(1, 1.6,  T)		
	
--		currentMult.Scene6.BackgroundMax03.x     = lerp(dttX - 35, 250,  T)
--		currentMult.Scene6.BackgroundMax03.y     = lerp( dttY + 25, 170, T)
--		currentMult.Scene6.BackgroundMax03.scale = lerp(0.6, 1,  T)	
						   
--		currentMult.Scene6.PriemnikMCopy.x       = lerp(dttX - 30, 210,  T)
--		currentMult.Scene6.PriemnikMCopy.y       = lerp(dttY - 45, 50,   T)
--		currentMult.Scene6.PriemnikMCopy.scale   = lerp(0.6, 1,  T)	
						   
		local PopularScale = lerp (0.6, 1, T)
		                                           
		currentMult.Scene6.BackgroundMax02.x     = lerp (dttX -21,dttX-30,T)  -- --lerp(dttX -11, 248, T)
		currentMult.Scene6.BackgroundMax02.y     = lerp (dttY-50,        dttY-20 +10,T)  --     --lerp(dttY,       128,  T)
		currentMult.Scene6.BackgroundMax02.scale = PopularScale 
						                         
		currentMult.Scene6.BackgroundMax01.x     = lerp (dttX-19  ,dttX - 26,T)  -- --lerp(dttX+22, 303, T)
		currentMult.Scene6.BackgroundMax01.y     = lerp (dttY ,   dttY -21 +10,T)  --    --lerp(dttY -2  , 127,  T)
		currentMult.Scene6.BackgroundMax01.scale = PopularScale 
		currentMult.Scene6.BackgroundMax01.color = Color(255, 255, 255, 255) --lerp(0, 255, T)) --lerp(0, 255, T))
						   
		currentMult.Scene6.PriemnikMax01.x       = lerp (dttX - 30 ,dttX - 40 -3, T)  ----lerp(dttX- 30, 210,  T)
		currentMult.Scene6.PriemnikMax01.y       = lerp (dttY - 75 ,dttY - 125, T)  -- --lerp(dttY- 45, 50,   T)
		currentMult.Scene6.PriemnikMax01.scale   = PopularScale --lerp(0.6, 1,  T)		
						   
		currentMult.Scene6.PriemnikLight.x       = lerp (dttX - 10     ,dttX - 10 -3,T)   ---lerp(dttX + 5 , 275,  T)
		currentMult.Scene6.PriemnikLight.y       = lerp (dttY -35  ,dttY -59 ,T) --     --lerp(dttY - 11, 106,  T)
		currentMult.Scene6.PriemnikLight.scale   = PopularScale --lerp(0.6, 1,  T)		
						   
	--	currentMult.Scene6.DragonsMax01.x        = lerp(dttX, 250,  T)
	--	currentMult.Scene6.DragonsMax01.y        = lerp(dttY, 115,  T)
	--	currentMult.Scene6.DragonsMax01.scale  = lerp(0.6, 1,  T)		
		
		currentMult.Scene6.DragonsMCopy.x        =lerp (dttX-5,dttX-10,T)  -- --lerp(dttX, 250,  T)
		currentMult.Scene6.DragonsMCopy.y        =lerp (dttY+15,dttY+15,T)  -- --lerp(dttY+30, 145,  T)
		currentMult.Scene6.DragonsMCopy.scale    =PopularScale --lerp(0.6, 1, T)
		
		currentMult.Scene6.DragonsMax01.x        = lerp (dttX-5,dttX-10,T)  -- --lerp(dttX, 250,  T)
		currentMult.Scene6.DragonsMax01.y        = lerp (dttY+15,dttY+18,T)  -- --lerp(dttY, 115,  T)
		currentMult.Scene6.DragonsMax01.scale    = PopularScale --lerp(0.6, 1,  T)		
						   
		currentMult.Scene6.DragonsLight.x        = lerp (dttX-14 ,dttX-23,T)  ----lerp(dttX, 250,  T)
		currentMult.Scene6.DragonsLight.y        = lerp (dttY-6,dttY-35+18,T)  -- --lerp(dttY, 115,  T)
		currentMult.Scene6.DragonsLight.scale    = PopularScale --lerp( 0.6, 1,  T)		
						   
		currentMult.Scene6.Ligh.x                = lerp (dttX-9, dttX-35,T)   ---lerp(dttX,   245,  T)
		currentMult.Scene6.Ligh.y                = lerp (dttY-20,dttY-20 ,T)  -- --lerp(dttY+10,135,  T)
		currentMult.Scene6.Ligh.scale            = PopularScale  --lerp(0.6,    1,      T)			
		
		currentMult.Scene6.Symbol.x = lerp ( 255,255 , T)
		currentMult.Scene6.Symbol.y = lerp(210,220 , T)
		
		currentMult.Scene6.Symbol.color = Color(255, 255, 255, 255)
		currentMult.Scene6.Symbol.scale = lerp( 1.2, 1.9, T)	
		--currentMult.Scene6.Symbol.color = Color(255, 255, 255, lerp( 255, 200, T))
		
		currentMult.Scene6.BackgroundMax02.color = Color(255, 255, 255, 255)
		currentMult.Scene6.PriemnikMax01.color   = Color(255, 255, 255, 0) --255)
		currentMult.Scene6.PriemnikLight.color   = Color(255, 255, 255, 255)
		currentMult.Scene6.DragonsMax01.color    = Color(255, 255, 255, 255)
		currentMult.Scene6.Ligh.color            = Color(255, 255, 255, 255)			
		currentMult.Scene6.DragonsLight.color    = Color(255, 255, 255, 255)			
		
		currentMult.Effect06.layer.isVisible = true
		currentMult.Effect06.Altar:Do("Reset")
		Effects06 ( timeScene )			
		
	elseif  1 - Destroid <= timeScene+Pause and  timeScene+Pause < 1 then

			local Ts = (timeScene + Pause - 1)/Destroid + 1			
	
	--		currentMult.Scene6.Ligh.scale            = lerp(1, 1.05, T)			
	--		currentMult.Scene6.DragonsLight.scale    = lerp(1, 1.05, T)		
	--		currentMult.Scene6.DragonsMax01.scale    = lerp(1, 1.05, T)		
	--		currentMult.Scene6.PriemnikLight.scale   = lerp(1, 1.05, T)		
	--		currentMult.Scene6.PriemnikMax01.scale   = lerp(1, 1.05, T)		
	--		currentMult.Scene6.BackgroundMax01.scale = lerp(1, 1.05, T)
	--		currentMult.Scene6.BackgroundMax02.scale = lerp(1, 1.05, T)	
	--		currentMult.Scene6.DragonsMCopy.scale    = lerp(1, 1.05, T)	
	--		currentMult.Scene6.PriemnikMCopy.scale   = lerp(1, 1.05, T)	
	--		currentMult.Scene6.BackgroundMax03.scale = lerp(1, 1.05, T)	
	--		                                                     
	--		
	--		currentMult.Scene6.Symbol.x = lerp(255, 230, Ts)
	--		currentMult.Scene6.Symbol.y = lerp(220, 228, Ts)	
			currentMult.Scene6.Symbol.color = Color(255, 255, 255, lerp( 255, 0, Ts))
			currentMult.Scene6.Symbol.scale = lerp(1.9, 0, Ts)	
			
			currentMult.Scene6.BackgroundMax01.color = Color(255, 255, 255, lerp(255, 0, Ts))
	--		currentMult.Scene6.PriemnikMax01.color   = Color(255, 255, 255, lerp(255, 0, Ts))
			currentMult.Scene6.PriemnikLight.color   = Color(255, 255, 255, lerp(255, 0, Ts))
			currentMult.Scene6.PriemnikMax01.color   = Color(255, 255, 255, lerp(0, 255, Ts))
			
			currentMult.Scene6.DragonsMax01.color    = Color(255, 255, 255, lerp(255, 0, Ts))
			currentMult.Scene6.Ligh.color            = Color(255, 255, 255, lerp(255, 0, Ts))	
			currentMult.Scene6.DragonsLight.color    = Color(255, 255, 255, lerp(255, 0, Ts))			
			Effects06 ( timeScene )				
	end 
end

function SymbolAnim_1 (timeScene)	
end            


function Scene6Show()
	currentMult.Scene6.layer.isVisible = true
	currentMult.Effect06.Altar:Do ("Reset")
end 

function Scene6Hide()
	currentMult.Scene6.layer.isVisible = false
	currentMult.Effect06.Altar:Do ("Finish")
end 