class DestructibleRoadSign extends BaseDestructibleDevice
{
	protected var m_frameMesh : MeshComponent;
	protected var m_uiMesh : MeshComponent;
	protected var m_uiMesh_2 : MeshComponent;

	protected event OnRequestComponents( ri : EntityRequestComponentsInterface )
	{
		super.OnRequestComponents( ri );
		EntityRequestComponentsInterface.RequestComponent( ri, 'mesh_frame', 'MeshComponent', false );
		EntityRequestComponentsInterface.RequestComponent( ri, 'mesh_ui', 'MeshComponent', false );
		EntityRequestComponentsInterface.RequestComponent( ri, 'mesh_ui_2', 'MeshComponent', false );
	}

	protected event OnTakeControl( ri : EntityResolveComponentsInterface )
	{
		super.OnTakeControl( ri );
		m_frameMesh = ( ( MeshComponent )( EntityResolveComponentsInterface.GetComponent( ri, 'mesh_frame' ) ) );
		m_uiMesh = ( ( MeshComponent )( EntityResolveComponentsInterface.GetComponent( ri, 'mesh_ui' ) ) );
		m_uiMesh_2 = ( ( MeshComponent )( EntityResolveComponentsInterface.GetComponent( ri, 'mesh_ui_2' ) ) );
		m_controller = ( ( BaseDestructibleController )( EntityResolveComponentsInterface.GetComponent( ri, 'controller' ) ) );
	}

	protected override function CreateDestructionEffects()
	{
		super.CreateDestructionEffects();
		if( m_frameMesh )
		{
			m_frameMesh.Toggle( false );
		}
		if( m_uiMesh )
		{
			m_uiMesh.Toggle( false );
		}
		if( m_uiMesh_2 )
		{
			m_uiMesh_2.Toggle( false );
		}
	}

	protected event OnPhysicalDestructionEvent( evt : PhysicalDestructionEvent )
	{
		super.OnPhysicalDestructionEvent( evt );
	}

	protected override function DeactivateDevice()
	{
		super.DeactivateDevice();
	}

	protected override function DeactivateDeviceSilent()
	{
		super.DeactivateDeviceSilent();
		if( m_frameMesh )
		{
			m_frameMesh.Toggle( false );
		}
		if( m_uiMesh )
		{
			m_uiMesh.Toggle( false );
		}
		if( m_uiMesh_2 )
		{
			m_uiMesh_2.Toggle( false );
		}
	}

	protected override function ActivateDevice()
	{
		m_destroyedMesh.Toggle( false );
		m_frameMesh.Toggle( true );
		m_uiMesh.Toggle( true );
		if( m_uiMesh_2 )
		{
			m_uiMesh_2.Toggle( true );
		}
	}

}

