private void execAgents_() { if (!Workspace.Instance.IsExecAgents) { return; } m_IsExecuting = true; this.Agents.Sort(); for (int i = 0; i < this.Agents.Count; ++i) { HeapItem_t pa = this.Agents[i]; var e = pa.agents.GetEnumerator(); while (e.MoveNext()) { Agent pAgent = e.Current.Value; if (pAgent.IsActive()) { try { pAgent.btexec(); } catch (System.Exception ex) { LogManager.Instance.Output(pAgent, "[Error] " + ex); behaviac.Debug.LogError(ex.ToString()); } // in case IsExecAgents was set to false by pA's bt if (!Workspace.Instance.IsExecAgents) { break; } } } } m_IsExecuting = false; this.DelayProcessingAgents(); }
private void execAgents_() { if (!Workspace.Instance.IsExecAgents) { return; } m_IsExecuting = true; this.Agents.Sort(); for (int i = 0; i < this.Agents.Count; ++i) { HeapItem_t pa = this.Agents[i]; var e = pa.agents.GetEnumerator(); while (e.MoveNext()) { Agent pAgent = e.Current.Value; if (pAgent.IsActive()) { pAgent.btexec(); // in case IsExecAgents was set to false by pA's bt if (!Workspace.Instance.IsExecAgents) { break; } } } } m_IsExecuting = false; this.DelayProcessingAgents(); }