-- ----------------------------------------------------------------------------
layoutCar.mExits =
{
}
layoutCar.mPOIs = 
{
	[objectCarMirrorSmallBackplate] = 
	{	
		target = layoutCarMirror,
		mirrors = {objectCarMirror}
	},
	[objectCarPaperwork] = 
	{	
		target = layoutCarPaperwork,
		track = "MANUAL_PAGE"
	},
}
layoutCar.mHOs = 
{
	[objectCarMirrorPiece0] = 
	{
		siblings = {objectCarMirrorPiece0Pocket, objectCarMirrorPiece0Lit},
	},
	[objectCarMirrorPiece1] = 
	{
		siblings = {objectCarMirrorPiece1Pocket, objectCarMirrorPiece1Lit},
	},
	[objectCarMirrorPiece2] = 
	{
		siblings = {objectCarMirrorPiece2Lit},
	},
	[objectCarMirrorPiece3] = 
	{
		siblings = {objectCarMirrorPiece3Pocket, objectCarMirrorPiece3Lit},
	},
	[objectCarMirrorPiece4] = 
	{
		siblings = {objectCarMirrorPiece4Lit},
	},
	[objectCarMirrorPiece5] = 
	{
		siblings = {objectCarMirrorPiece5Pocket, objectCarMirrorPiece5Lit},
	},
	[objectCarMirrorPiece6] = 
	{
		siblings = {objectCarMirrorPiece6Pocket, objectCarMirrorPiece6Lit},
	},
	[objectCarMirrorPiece7] = 
	{
		siblings = {objectCarMirrorPiece7Pocket, objectCarMirrorPiece7Lit},
	},
	[objectCarMirrorPiece9] = 
	{
		siblings = {objectCarMirrorPiece9Lit},
	},
}
layoutCar.mIOs =
{
}
-- ----------------------------------------------------------------------------
function layoutCar:onConstruct()
	
	Layout.onConstruct(self)
	
	objectCarMirror:ss(kActive)
    objectCarMirrorSmallBackplate:ss(kInactive)
    objectCarMirrorShine:ss(kInactive)    
    objectCarPaperwork:ss(kActive)
    
end

-- ----------------------------------------------------------------------------
function layoutCar:onStartAudio()

	playAmbientAudio(kInsideHutAmbientGroup)

end
-- ----------------------------------------------------------------------------
function layoutCar:onAnimationFinish(animationName)

	Layout.onAnimationFinish(self, animationName)
	
	if (animationName == "carMirrorShine") then
		self:showMirrorHighlight()
	end
	
end
-- ----------------------------------------------------------------------------
function layoutCar:showMirrorHighlight()

	if (objectCarMirrorShine:isIdle()) then
		objectCarMirrorShine:animate("carMirrorShine",
			{ delay = math.random(2000, 4000) },
			{ startframe=0, endframe=10, frametime=75 }
		)		
	end

end