class TrafficZebra extends TrafficLight
{
	default m_controllerTypeName = 'TrafficZebraController';

	protected event OnTakeControl( ri : EntityResolveComponentsInterface )
	{
		super.OnTakeControl( ri );
		m_controller = ( ( TrafficZebraController )( EntityResolveComponentsInterface.GetComponent( ri, 'controller' ) ) );
	}

	private const override function GetController() : TrafficZebraController
	{
		return ( ( TrafficZebraController )( m_controller ) );
	}

	public const override function GetDevicePS() : TrafficZebraControllerPS
	{
		return GetController().GetPS();
	}

	protected event OnTrafficLightChangeEvent( evt : TrafficLightChangeEvent )
	{
		if( m_lightState != evt.lightColor && GetDevicePS().IsInitialized() )
		{
			m_lightState = evt.lightColor;
			if( evt.lightColor == worldTrafficLightColor.GREEN )
			{
				HandleGreenLight();
			}
			else
			{
				HandleRedLight();
			}
		}
	}

	private function HandleRedLight()
	{
		SetMeshAppearance( 'stop' );
	}

	private function HandleGreenLight()
	{
		SetMeshAppearance( 'default' );
	}

}

