private void StopMeasurement()
    {
        measurementActive = false;
        UI.SetActive(true);
        Logger.EndMeasurement();

        currentTime = 0;
        TargetManager.DeactivateTargets();
        ObstacleManager.DeactivateAllObstacles();

        StopScenario();
    }
    public static void OnStoreAction(Target target)
    {
        Instance.numberOfObjectsSorted++;
        Instance.statusText.text = "Measurement Active"
                                   + "\n" + Instance.numberOfObjectsSorted + " / " + Instance.totalNumberOfObjectsToSort;

        if (Instance.numberOfObjectsSorted >= Instance.totalNumberOfObjectsToSort)
        {
            TargetManager.DeactivateTargets();
            ObstacleManager.DeactivateAllObstacles();
            TargetManager.MoveAllTargets();
            ObstacleManager.MoveObjects();
            Instance.numberOfObjectsSorted      = 0;
            Instance.totalNumberOfObjectsToSort = TargetManager.CurrentTargets.Length;
            //One run finished
        }
    }
    private void StopScenario()
    {
        targetsClicked  = -1;
        statusText.text = "Menu";
        switch (SceneHandler.ScenarioType)
        {
        case ScenarioType.Menu:
            break;

        case ScenarioType.Performance:
            TargetManager.DeactivateTargets();
            break;

        case ScenarioType.Occlusion:
            ObstacleManager.DeactivateAllObstacles();
            TargetManager.DeactivateTargets();
            break;

        case ScenarioType.Sorting:
            TargetManager.DeactivateTargets();
            ObstacleManager.DeactivateAllObstacles();
            break;
        }
    }