public static void SetJumpInfo(string agentFullname, string thisThree, int nodeId, string jumpTree) { if (!_btStack.ContainsKey(agentFullname)) { _btStack[agentFullname] = new List <BTStackItem>(); } BTStackItem item = new BTStackItem(); item.thisTree = thisThree + ".xml"; item.nodeId = nodeId; item.jumpTree = jumpTree + ".xml"; //push at the end _btStack[agentFullname].Add(item); }
private static void CheckJump(string agentFullname, ref string behaviorFilename, ref string nodeId) { List <BTStackItem> stack = GetStack(agentFullname); if (stack != null && stack.Count > 0) { BTStackItem top = stack[stack.Count - 1]; if (top.jumpTree == behaviorFilename) { behaviorFilename = stack[0].thisTree; string id = ""; for (int i = 0; i < stack.Count; ++i) { id += string.Format("{0}:", stack[i].nodeId); } id += nodeId; nodeId = id; } } }
public static void SetJumpInfo(string agentFullname, string thisThree, int nodeId, string jumpTree) { if (!_btStack.ContainsKey(agentFullname)) { _btStack[agentFullname] = new List<BTStackItem>(); } BTStackItem item = new BTStackItem(); item.thisTree = thisThree + ".xml"; item.nodeId = nodeId; item.jumpTree = jumpTree + ".xml"; //push at the end _btStack[agentFullname].Add(item); }