void FlickerScene()
    {
        //  Start flickering the HUD
        if (!e_flickStartCall)
        {
            Debug.Log("Flicker start");

            flickManagerRef.startAllFlicker();      // start flicker for HUD
            pcFlickerRef.beginFlicker();            // start flicker for PC object

            locationDataRef.NewFile();
            CarMoveRef.MoveCar();

            e_flickStartCall = true;
        }

        // Generates the sub-trials of search arrays
        timer += Time.deltaTime;

        if (!e_trialCall)
        {
            // Sub-trial #1
            if (!subTrial1 && timer >= 0)
            {
                Debug.Log("subt1 start");

                DestroyClones();                                                    // destroys previous cubes
                trialSpawnRef.waypointtag = waypointNames[0];
                trialSpawnRef.spawnShapes();                                        // generate search array
                RotateClones(waypointNames[0], -135);                               // hard coded y-axis rotation*

                if (trialSpawnRef.targetSignal == 0)                                // add to target counter for response correct later
                {
                    targetCounter++;
                }
                targetLocation1 = trialSpawnRef.targetWaypointName;                 // store temp target value (if present)
                locationDataRef.writeData();

                marker    = 1;
                subTrial1 = true;
            }

            // Sub-trial #2
            if (!subTrial2 && timer >= subtrialTime)
            {
                Debug.Log("subt2 start");

                DestroyClones();                                                // destroys previous cubes
                trialSpawnRef.waypointtag = waypointNames[1];
                trialSpawnRef.spawnShapes();                                    // generate search array
                RotateClones(waypointNames[0], -80);                            // hard coded y-axis rotation*

                if (trialSpawnRef.targetSignal == 0)                            // add to target counter for response correct later
                {
                    targetCounter++;
                }
                targetLocation2 = trialSpawnRef.targetWaypointName;          // store temp target value (if present)
                locationDataRef.writeData();

                marker    = 2;
                subTrial2 = true;
            }
            // Sub-trial #3
            if (!subTrial3 && timer >= subtrialTime * 2)
            {
                Debug.Log("subt3 start");

                DestroyClones();                                                // destroys previous cubes
                trialSpawnRef.waypointtag = waypointNames[2];
                trialSpawnRef.spawnShapes();                                    // generate search array
                RotateClones(waypointNames[0], -15);                            // hard coded y-axis rotation*

                if (trialSpawnRef.targetSignal == 0)                            // add to target counter for response correct later
                {
                    targetCounter++;
                }
                targetLocation3 = trialSpawnRef.targetWaypointName;          // store temp target value (if present)
                locationDataRef.writeData();

                marker    = 3;
                subTrial3 = true;
            }
            // Sub-trial #4
            if (!subTrial4 && timer >= subtrialTime * 3)
            {
                Debug.Log("subt4 start");

                DestroyClones();                                                // destroys previous cubes
                trialSpawnRef.waypointtag = waypointNames[3];
                trialSpawnRef.spawnShapes();                                    // generate search array
                RotateClones(waypointNames[0], 60);                             // hard coded y-axis rotation*

                if (trialSpawnRef.targetSignal == 0)                            // add to target counter for response correct later
                {
                    targetCounter++;
                }
                targetLocation4 = trialSpawnRef.targetWaypointName;          // store temp target value (if present)
                locationDataRef.writeData();

                marker    = 4;
                subTrial4 = true;
            }
            // Sub-trial #5
            if (!subTrial5 && timer >= subtrialTime * 4)
            {
                Debug.Log("subt5 start");

                DestroyClones();                                                // destroys previous cubes
                trialSpawnRef.waypointtag = waypointNames[4];
                trialSpawnRef.spawnShapes();                                    // generate search array
                RotateClones(waypointNames[0], 90);                             // hard coded y-axis rotation*

                if (trialSpawnRef.targetSignal == 0)                            // add to target counter for response correct later
                {
                    targetCounter++;
                }
                targetLocation5 = trialSpawnRef.targetWaypointName;          // store temp target value (if present)
                locationDataRef.writeData();

                marker    = 5;
                subTrial5 = true;
            }
            // Sub-trial #6
            if (!subTrial6 && timer >= subtrialTime * 5)
            {
                Debug.Log("subt6 start");

                DestroyClones();                                                // destroys previous cubes
                trialSpawnRef.waypointtag = waypointNames[5];
                trialSpawnRef.spawnShapes();                                    // generate search array
                RotateClones(waypointNames[0], 135);                            // hard coded y-axis rotation*

                if (trialSpawnRef.targetSignal == 0)                            // add to target counter for response correct later
                {
                    targetCounter++;
                }
                targetLocation6 = trialSpawnRef.targetWaypointName;          // store temp target value (if present)
                locationDataRef.writeData();

                marker    = 6;
                subTrial6 = true;
            }
        }

        //  When full trial time is reached, end the trial
        if (timer >= (subtrialTime * 6))
        {
            Debug.Log("Flicker stop");

            flickManagerRef.stopAllFlicker();       // turns off the HUD flicker
            pcFlickerRef.stopFlicker();             // turns off the PC object flicker

            timer       = 0f;                       // Reset the timer for the next experiment phase
            flickerDone = true;                     // Sets the flickerDone flag to true
        }
    }