public void FinishMiniGame()
    {
        SortingGame sortingGame = GetComponent <SortingGame>();

        if (sortingGame)
        {
            sortingGame.FillInDataCollectionForRemainingObjects(); // In case of time running out collect data
            DisplayFinishedLevelInfo(true);
        }

        InvestigationGame investigationGame = GetComponent <InvestigationGame>();

        if (investigationGame)
        {
            investigationGame.FillInDataCollectionForRemainingObjects();
            DisplayFinishedLevelInfo(true);
        }

        Quiz quiz = GetComponent <Quiz>();

        if (quiz)
        {
            //  GetComponent<LeaderBoard>().SaveFinalResultToLeaderboardFile();
            quiz.FillInDataCollectionForRemainingObjects();
            DisplayFinishedLevelInfo(false);
        }

        Time.timeScale = 0;
    }
    public void ReplayLevel()
    {
        SortingGame sortingGame = GetComponent <SortingGame>();

        if (sortingGame)
        {
            DataCollectionFileManager.AdjustDataFileForReplay(22); // 22 columns to remove from the file from the current session's row
        }

        InvestigationGame investigationGame = GetComponent <InvestigationGame>();

        if (investigationGame)
        {
            DataCollectionFileManager.AdjustDataFileForReplay(22); // 22 columns to remove from the file from the current session's row
        }

        Quiz quiz = GetComponent <Quiz>();

        if (quiz)
        {
            DataCollectionFileManager.AdjustDataFileForReplay(9); // 9 columns to remove from the file from the current session's row
        }

        SessionManager.Score = SessionManager.scoreBeforeStartLevel;
        _sceneSwitcher.SwitchScene(SceneManager.GetActiveScene().name);
    }