public void InvokeInteraction(TriggerEnterPayload triggerEnterPayload) { if (onInteract != null && EvaluateConditionals()) { onInteract.Invoke(triggerEnterPayload); } }
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); }