示例#1
0
 public void AddEdge(TutorialEdge edge)
 {
     if (!edges.Contains(edge))
     {
         edges.Add(edge);
     }
 }
示例#2
0
    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;
    }
示例#3
0
    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;
            }
        }
    }