public void AddEdge(TutorialEdge edge) { if (!edges.Contains(edge)) { edges.Add(edge); } }
public void ResetNode() { ChangeAppearance(Util.STANDARD_COLOR); Instruction = new InstructionBase(Util.INIT_INSTRUCTION, Util.NO_INSTRUCTION_NR); visited = false; traversed = false; visitNextMove = false; traverseNextMove = false; animator.SetBool(UtilGraph.NODE_VISIT_ANIMATION, false); animator.SetBool(UtilGraph.NODE_TRAVERSE_ANIMATION, false); prevEdge = null; }
private void FindEdgeAndChangeAppearance(Color color, bool setPrevEdge) { // Get edge leading from the node we just shot back to the current node foreach (TutorialEdge edge in edges) { if (edge.PlayerCurrentlyAtOtherNode(this)) { edge.ChangeAppearance(color); if (setPrevEdge) { prevEdge = edge; } break; } } }