class ActivatedDeviceCover extends ActivatedDeviceTransfromAnim
{
	protected var m_offMeshConnection : OffMeshConnectionComponent;

	protected event OnRequestComponents( ri : EntityRequestComponentsInterface )
	{
		super.OnRequestComponents( ri );
		EntityRequestComponentsInterface.RequestComponent( ri, 'offMeshConnection', 'OffMeshConnectionComponent', false );
	}

	protected event OnTakeControl( ri : EntityResolveComponentsInterface )
	{
		super.OnTakeControl( ri );
		m_offMeshConnection = ( ( OffMeshConnectionComponent )( EntityResolveComponentsInterface.GetComponent( ri, 'offMeshConnection' ) ) );
		m_controller = ( ( ActivatedDeviceController )( EntityResolveComponentsInterface.GetComponent( ri, 'controller' ) ) );
	}

	protected event OnActivateDevice( evt : ActivateDevice )
	{
		RefreshAnimation();
		if( GetDevicePS().IsON() )
		{
			m_offMeshConnection.DisableOffMeshConnection();
		}
		else
		{
			m_offMeshConnection.EnableOffMeshConnection();
		}
	}

}

