<scene name="CopCar" numVictoryConditions="1" numSteps="2">
	<inventory>
		<object name="Dime" memberName="HUD_dime" acquired="0" visible="0"/>
		<object name="Hairpin" memberName="HUD_hairpin" acquired="0" visible="0"/>
		<object name="Gum" memberName="HUD_gum" acquired="0" visible="0"/>
	</inventory>
	
	<finalStates>
		<finalState objName="FloorWindow" state="done"/>
		<finalState objName="PanelWindow" state="open"/>
		<finalState objName="ExitArea" state="replayExit"/>
	</finalStates>
	
	<slidersMap>
		<slider layerName="slider_R45_Debris" id="bridge7"/>
	</slidersMap>

	
	<animations>
		<animation name="DavidAnim" type="once" zpos="200" crossfade="1">
			<frames>
				<frame memberName="d1_anim" frameDelay="500"/>
				<frame memberName="d2_anim" frameDelay="500"/>
			</frames>
		</animation>
	</animations>
	
	<zoomWindows>
		<zoomWindow name="FloorWindow" file="ZoomWindows\CopCar_Z1.dir" visible="0" hotspot="point(735, 716)"/>
		<zoomWindow name="PanelWindow" file="ZoomWindows\CopCar_Z2.dir" visible="0" hotspot="point(605, 437)"/>
	</zoomWindows>
	
	<objects>
		<object name="Ambience">
			<states>
				<state name="Ambience">
					<onStateEnter>
						<action target="Scene" name="PlaySound" param="S-31"/>
					</onStateEnter>
				</state>
			</states>
		</object>

		<object name="FloorWindow">
			<clickStrategy type="rect" left="670" top="665" right="800" bottom="768"/>
			<states>
				<state name="notAvailable">
					<onEvent name="reveal">
						<action target="Scene" name="RevealHotspot" param="FloorWindow"/>
						<action target="FloorWindow" name="SetState" param="clickable"/>
					</onEvent>
				</state>
				
				<state name="clickable">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>

					<onClick>
						<action target="Scene" name="OpenWindow" param="FloorWindow"/>
					</onClick>
				</state>
				
				<state name="done">
				</state>
			</states>
		</object>
		
		<object name="PanelWindow">
			<clickStrategy type="alpha" layer="panel open"/>
			<states>
				<state name="locked">
					<onStateEnter>
						<action target="Scene" name="HideLayer" param="panel open"/>
						<action target="Scene" name="HideLayer" param="mechanical parts CLOSED"/>
						<action target="Scene" name="HideLayer" param="mechanical parts OPEN"/>
						<action target="Scene" name="HideLayer" param="door open"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="puzzle"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="panel_click"/>
						<action target="FloorWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onUseObject name="Dime">
						<action target="Scene" name="RemoveFromInventory" param="Dime"/>
						<action target="PanelWindow" name="SetState" param="clickable"/>
						<action target="Scene" name="RevealHotspot" param="PanelWindow"/>
						<action target="Scene" name="PlaySound" param="p-047"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onUseObject>
				</state>
				
				<state name="clickable">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="panel open"/>
						<action target="Scene" name="ShowLayer" param="mechanical parts CLOSED"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>

					<onClick>
						<action target="Scene" name="OpenWindow" param="PanelWindow"/>
						<action target="FloorWindow" name="SendEvent" param="reveal"/>
					</onClick>
					
					<onEvent name="mechanismComplete">
						<action target="Scene" name="CloseWindow" param="PanelWindow"/>
						<action target="Scene" name="DisableZoominHotspot" param="CopCar_Z2"/>
						<action target="PanelWindow" name="SetState" param="open" delay="500"/>
						<action target="ExitArea" name="SendEvent" param="door_open"/>
						<action target="Scene" name="PlaySound" param="p-050"/>
						<action target="Scene" name="StepComplete" param=""/>
					</onEvent>
				</state>
				
				<state name="open">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="door open"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="ExitArea">
			<clickStrategy type="rect" left="180" top="65" right="365" bottom="590"/>
			<states>
				<state name="notAvailable">
					<onEvent name="door_open">
						<action target="ExitArea" name="SetState" param="available"/>
						<action target="Scene" name="PlaySound" param="p-050"/>
					</onEvent>
				</state>
				
				<state name="available">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="ExitArea" name="SetState" param="done"/>
						<action target="Scene" name="StartAnimation" param="DavidAnim"/>
						<action target="Scene" name="RegisterVictoryCondition" param="" delay="1000"/>
					</onClick>
				</state>
				
				<state name="done">
				
				</state>
				
				<state name="replayExit">
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ReplayExit" param=""/>
					</onClick>
				</state>
			</states>
		</object>
	</objects>
</scene>

