dofile("scripts/entities/entityinclude.lua")


--function bASDFASDF () ()A {}}A SDFASJDF end end end

n = 0
mia = 0
baby = 0

done = false

function init(me)
	n = getNaija()
	mia = getEntity("MiaGhost")
	baby = getEntity("NaijaBabyGhost")
	
	entity_alpha(mia, 0)
	entity_alpha(baby, 0)
end

function update(me, dt)
	if not done then 
		if node_isEntityIn(me, n) then
			done = true
			
			changeForm(FORM_NORMAL)
			
			entity_animate(mia, "baby", -1)
			
			entity_idle(n)
			
			cam_toEntity(mia)
			
			setSceneColor(0.5, 0.5, 1, 2)
			watch(2)
			
			--playMusic("Mystery")
		
			entity_alpha(mia, 1, 2)
			
			watch(4)
			
			entity_alpha(baby, 1, 2)
			watch(4)
			
			entity_animate(mia, "babyLookUp")
			
			watch(2.5)
			--fadeOutMusic(3)
			setSceneColor(1, 1, 1, 3)
			entity_alpha(mia, 0, 1)
			watch(2)
			entity_alpha(baby, 0, 1)
			watch(2)
			
			cam_toEntity(n)
			
			if isFlag(FLAG_SECRET01, 0) then
				setFlag(FLAG_SECRET01, 1)
				
				foundLostMemory()
			end
			
			--updateMusic()
		
		end
	end
	
end
