namespace VRTK.Prefabs.Interactions.Interactors
{
using UnityEngine;
using Zinnia.Data.Operation.Extraction;
///
/// Extracts a relevant to the extraction method from an .
///
public class InteractorExtractor : GameObjectExtractor
{
///
/// Extracts the the is residing on.
///
/// The Interactor to extract from.
/// The residing .
public virtual GameObject Extract(InteractorFacade interactor)
{
if (interactor == null)
{
Result = null;
return null;
}
Result = interactor.gameObject;
return base.Extract();
}
///
/// Extracts the the is residing on.
///
/// The Interactor to extract from.
public virtual void DoExtract(InteractorFacade interactor)
{
Extract(interactor);
}
///
/// Extracts the attach point associated with the grabbing functionality of the Interactor.
///
/// The Interactor to extract from.
/// The attach point.
public virtual GameObject ExtractAttachPoint(InteractorFacade interactor)
{
if (interactor == null || interactor.GrabConfiguration == null)
{
Result = null;
return null;
}
Result = interactor.GrabConfiguration.AttachPoint;
return base.Extract();
}
///
/// Extracts the attach point associated with the grabbing functionality of the Interactor.
///
/// The Interactor to extract from.
public virtual void DoExtractAttachPoint(InteractorFacade interactor)
{
ExtractAttachPoint(interactor);
}
}
}