コード例 #1
0
 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;
 }
コード例 #2
0
ファイル: Food.cs プロジェクト: Flave229/Puffin
 public void HandleCommunication(IInteractable interactor, EIntent intent, Action onSuccessfulInteraction = null, Action onFailedInteraction = null)
 {
     if (intent != EIntent.EAT)
     {
         onFailedInteraction?.Invoke();
     }
     else
     {
         onSuccessfulInteraction?.Invoke();
     }
 }
コード例 #3
0
ファイル: Food.cs プロジェクト: Flave229/Puffin
        void OnTriggerStay(Collider collidingEntity)
        {
            EIntent intent = EstablishColliderIntent(collidingEntity);

            if (intent == EIntent.UNKNOWN)
            {
                return;
            }

            HandleBeingEaten(collidingEntity);
        }
コード例 #4
0
ファイル: AgentBehaviour.cs プロジェクト: Flave229/Puffin
 public void HandleCommunication(IInteractable interactor, EIntent intent, Action onSuccessfulInteraction = null,
                                 Action onFailedInteraction = null)
 {
     throw new NotImplementedException();
 }