public IntentTask(IInteractable interactor, IInteractable interactee, EIntent intention, Action onSuccess = null, Action onFail = null) { _interactor = interactor; _interactee = interactee; _intention = intention; _onSuccess = onSuccess; _onFail = onFail; _completed = false; }
public void HandleCommunication(IInteractable interactor, EIntent intent, Action onSuccessfulInteraction = null, Action onFailedInteraction = null) { if (intent != EIntent.EAT) { onFailedInteraction?.Invoke(); } else { onSuccessfulInteraction?.Invoke(); } }
void OnTriggerStay(Collider collidingEntity) { EIntent intent = EstablishColliderIntent(collidingEntity); if (intent == EIntent.UNKNOWN) { return; } HandleBeingEaten(collidingEntity); }
public void HandleCommunication(IInteractable interactor, EIntent intent, Action onSuccessfulInteraction = null, Action onFailedInteraction = null) { throw new NotImplementedException(); }