Beispiel #1
0
        public void InterruptBehavior(bool cameFromBehavior)
        {
            agent.historyType.RecordBehaviorLog(agent, HistoryType.BehaviorRunType.Interrupted, behaviorType, cameFromBehavior);

            // Interrupts can come from the decider or from the behavior
            if (cameFromBehavior)
            {
                agent.decider.InterruptMapping(true);
            }
            else if (behaviorType != null)
            {
                behaviorType.InterruptBehavior(agent);
            }

            isRunning      = false;
            wasInterrupted = true;
        }