namespace Tilia.Interactions.Interactables.Interactables.Operation.Extraction
{
using System;
using UnityEngine.Events;
using Zinnia.Data.Operation.Extraction;
using Zinnia.Extension;
///
/// Extracts and emits the found in relation to the .
///
public class InteractableFacadeExtractor : ComponentExtractor
{
///
/// Defines the event with the specified .
///
[Serializable]
public class UnityEvent : UnityEvent { }
///
protected override InteractableFacade ExtractValue()
{
return Source != null
? Source.gameObject.TryGetComponent(
(SearchAlsoOn & SearchCriteria.IncludeDescendants) != 0,
(SearchAlsoOn & SearchCriteria.IncludeAncestors) != 0)
: null;
}
///
protected override bool InvokeResult(InteractableFacade data)
{
return InvokeEvent(data);
}
}
}