Example #1
0
    protected override void TaskCompletedFinishOff()
    {
        if (graphSettings.IsDemo())
        {
            switch (graphSettings.GraphTask)
            {
            case UtilGraph.TRAVERSE:
                break;

            case UtilGraph.SHORTEST_PATH:
                if (!backtracking)
                {
                    if (graphAlgorithm.ShortestPathOneToAll)
                    {
                        StartCoroutine(graphManager.BacktrackShortestPathsAll(graphAlgorithm.DemoStepDuration));
                    }
                    else
                    {
                        listVisual.CreateBackTrackList(graphManager.EndNode);
                        StartCoroutine(graphManager.BacktrackShortestPath(graphManager.EndNode, graphAlgorithm.DemoStepDuration));
                    }
                    backtracking = true;
                }
                break;
            }
        }
        else if (Settings.IsUserTest())
        {
            if (Settings.UserTestScore)
            {
                userTestManager.SetEndTime();
                userTestManager.CalculateScore();
                blackboard.ChangeText(0, "User test details:");
                blackboard.ChangeText(1, userTestManager.GetExaminationResult() + "\n" + userTestManager.IncorrectActionDetails());
            }
        }
    }