// Adds exit edges to the graph public void addExit(int p_id, string p_statement, int p_fromNode, int p_toNode) { Response temp = new Response(p_statement, p_fromNode, p_toNode, true); temp.setIsExit(true); edges.Insert(p_id, temp); foreach (KeyValuePair<Node, ArrayList> pair in graph) { if(pair.Key.getId() == p_fromNode) pair.Value.Add(temp); } }
//, int p_altToNode) // Adds exit edges to the graph public void addExit(int p_id, string p_statement, int p_fromNode, int p_toNode) { Response temp = new Response(p_statement, p_fromNode, p_toNode);//, p_altToNode); temp.setIsExit(true); edges.Insert(p_id, temp); foreach (KeyValuePair<Node, ArrayList> pair in graph) { if(pair.Key.getId() == p_fromNode) pair.Value.Add(temp); } if(debug) Debug.Log("Added Response: "+p_id+"\n\tfrom: "+p_fromNode+"\n\tto: "+p_toNode);//+"\n\tAlternative to: "+p_altToNode); }