
.namespace s14_SearchSite

function OnEnable()
	SearchSite.OnEnable()
	OPLog.Log("OnEnable unit "..self.Name)
	--On définit le nom du tableau
	if  SampleLevel.IsEqual("s14_search_1","unstarted") then 
		grotte_hotspot.Enabled = true
		echelle.Enabled = false
		entre_hotspot.Enabled = false
		liste_s14_1.Enabled = true
		SampleLevel.Set("s14_echelle",false)
	end

	if SampleLevel.IsEqual("s14_echelle",true) then
		grotte_hotspot.Enabled = false
		echelle.Enabled = true
		entre_hotspot.Enabled = true
		end
end

function OnEnter()
	if SampleLevel.IsEqual("s14_firstenter",true) then
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_1400",nil,nil)
		
		SampleLevel.Set("s14_firstenter",false)
	end	
	
end


function UpdateAll()
	
end

function OnPickObject(objname)

end
-- function OnSequenceEnd (keyword)
	-- if keyword == "GP_1403" then
	 -- NavigationManager.SwitchTo(nil,"s15_SearchSite")
  -- end
 -- end

function OnSearchEnd(typesearch)
	if typesearch == 1 then
		InventoryManager.AddInInventory("InventoryEchelles14","msg_ig_inventaire")
		InventoryEchelles14.Equipped = true
		-- SequencePlayer.Enabled = true
		-- SequencePlayer.PlaySequence("GP_1103",s11_SearchSite,nil)
		-- InventoryManager.AddInInventory("InventoryCorne","msg_ig_inventaire")
		-- InventoryCorne.Equipped = true
	end

end


function OnPopupLeave(objname)
	if objname == "InventoryEchelles14" then
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_1402",nil,nil)
	end
end


function CondSpecificToFinish()

end

function OnPickObject(objname)
	if objname == "obj_jerrycan2" then
		SequencePlayer.Enabled = true
		SequencePlayer.PlaySequence("GP_1404",nil,nil)
	end
end