private static void updateUI(int frame) { if (_timelineDock != null) { if (MessageQueue.IsConnected) { HighlightBreakPoint breakPoint = HighlightBreakPoint.Instance; string agentName = Plugin.DebugAgentInstance; if (breakPoint != null || agentName == Plugin.DebugAgentInstance) { List <string> transitionIds = null; List <string> highlightNodeIds = null; List <string> updatedNodeIds = null; Dictionary <string, FrameStatePool.NodeProfileInfos.ProfileInfo> profileInfos = null; if (!string.IsNullOrEmpty(agentName)) { string behaviorFilename = FrameStatePool.GetBehaviorFilename(agentName, frame); if (!string.IsNullOrEmpty(behaviorFilename)) { transitionIds = FrameStatePool.GetHighlightTransitionIds(agentName, frame, behaviorFilename); highlightNodeIds = FrameStatePool.GetHighlightNodeIds(agentName, frame, behaviorFilename); updatedNodeIds = FrameStatePool.GetUpdatedNodeIds(agentName, frame, behaviorFilename); profileInfos = FrameStatePool.GetProfileInfos(frame, behaviorFilename); } } _timelineDock.updateHighlights(agentName, frame, transitionIds, highlightNodeIds, updatedNodeIds, breakPoint, profileInfos); if (breakPoint != null) { string prompt = string.Format("Break: {0}->{1}[{2}]:{3}", breakPoint.BehaviorFilename, breakPoint.NodeType, breakPoint.NodeId, breakPoint.ActionName); if (breakPoint.ActionResult == "success" || breakPoint.ActionResult == "failure") { prompt += string.Format(" [{0}]", breakPoint.ActionResult); } if (_timelineDock != null) { _timelineDock.setUpdateMode(UpdateModes.Break, prompt); } } } } } }
private static void updateUI(int frame) { if (_timelineDock != null) { //when breaking cpp, only check breakpoints after [connected], i.e. skip breakpoints before connecting if (!Settings.Default.BreakAPP || MessageQueue.IsConnected) { HighlightBreakPoint breakPoint = HighlightBreakPoint.Instance; string agentName = Plugin.DebugAgentInstance; if (breakPoint != null || agentName == Plugin.DebugAgentInstance) { List <string> highlightNodeIds = null; List <string> updatedNodeIds = null; Dictionary <string, FrameStatePool.NodeProfileInfos.ProfileInfo> profileInfos = null; if (!string.IsNullOrEmpty(agentName)) { string behaviorFilename = FrameStatePool.GetBehaviorFilename(agentName, frame); if (!string.IsNullOrEmpty(behaviorFilename)) { highlightNodeIds = FrameStatePool.GetHighlightNodeIds(agentName, frame, behaviorFilename); updatedNodeIds = FrameStatePool.GetUpdatedNodeIds(agentName, frame, behaviorFilename); profileInfos = FrameStatePool.GetProfileInfos(frame, behaviorFilename); } } _timelineDock.updateHighlights(agentName, frame, highlightNodeIds, updatedNodeIds, breakPoint, profileInfos); if (breakPoint != null) { string prompt = string.Format("Break: {0}->{1}[{2}]:{3}", breakPoint.BehaviorFilename, breakPoint.NodeType, breakPoint.NodeId, breakPoint.ActionName); if (breakPoint.ActionResult == "success" || breakPoint.ActionResult == "failure") { prompt += string.Format(" [{0}]", breakPoint.ActionResult); } _timelineDock.setUpdateMode(UpdateModes.Break, prompt); } } } } }