public void InvokeInteraction(TriggerEnterPayload triggerEnterPayload)
 {
     if (onInteract != null && EvaluateConditionals())
     {
         onInteract.Invoke(triggerEnterPayload);
     }
 }
Beispiel #2
0
    public bool ReceiveTriggerEnterInteraction(TriggerEnterPayload triggerEnterPayload)
    {
        bool hasInteraction = false;

        foreach (var interaction in Interactions)
        {
            if (interaction is TriggerEnterInteraction)
            {
                (interaction as TriggerEnterInteraction).InvokeInteraction(triggerEnterPayload);
                hasInteraction = true;
            }
        }

        return(hasInteraction);
    }