public virtual void RecordBehaviorLog(Agent agent, BehaviorRunType runType, BehaviorType behaviorType, bool interruptFromBehavior = false) { agentsBehaviorLogs[agent].Add(new BehaviorLog() { time = Time.time, runType = runType, behaviorType = behaviorType, interruptFromBehavior = interruptFromBehavior }); }
public void ResetBehavior() { behaviorType = null; isRunning = false; isWaiting = false; waitTime = 0f; startedWaitingAt = 0f; wasInterrupted = false; lastOCUpdateTime = 0f; behaviorContext.Reset(); }
// Can already be interrupted due to BeforeStart OutputChanges failing public void StartBehavior(ActionType actionType, Entity target, List <Selector> attributeSelectors, bool wasInterrupted) { behaviorType = actionType.behaviorType; behaviorContext.Set(actionType, target, attributeSelectors); isRunning = true; this.wasInterrupted = wasInterrupted; lastOCUpdateTime = Time.time; behaviorType.SetContext(agent, behaviorContext); agent.historyType.RecordBehaviorLog(agent, HistoryType.BehaviorRunType.Started, behaviorType); behaviorType.StartBehavior(agent); agent.StartCoroutine(UpdateBehavior()); }
public override void RecordBehaviorLog(Agent agent, BehaviorRunType runType, BehaviorType behaviorType, bool interruptFromBehavior = false) { }