namespace Zinnia.Cast.Operation.Extraction
{
using System;
using UnityEngine;
using UnityEngine.Events;
///
/// Extracts and emits the of the collision from .
///
public class PointsCastEventDataRaycastHitExtractor : PointsCastEventDataExtractor
{
///
/// Defines the event with the specified .
///
[Serializable]
public class UnityEvent : UnityEvent { }
///
protected override RaycastHit ExtractValue()
{
return CanExtract() ? (RaycastHit)Source.HitData : new RaycastHit();
}
///
protected override bool InvokeResult(RaycastHit data)
{
return CanExtract() ? InvokeEvent(data) : false;
}
}
}