public void Activate()
    {
        // (Re)Set volume for post process vignette effect
        if (vignette != null)
        {
            vignette.intensity.value = 0f;
            Destroy(vignette);
            vignette = null;
        }
        vignette = ScriptableObject.CreateInstance <Vignette>();
        vignette.enabled.Override(true);
        vignette.intensity.Override(0f);
        vignette.roundness.Override(1f);
        vignette.smoothness.Override(1f);
        volume = PostProcessManager.instance.QuickVolume(8, 100f, vignette);

        // (Re)Set cubeHasBeenHere
        cubeHasBeenHere = new Dictionary <MazeFrameSplines.SplineSegment, bool>(MazeFrameSplines.SplineSegments.Count);
        foreach (MazeFrameSplines.SplineSegment segment in MazeFrameSplines.SplineSegments)
        {
            cubeHasBeenHere.Add(segment, false);
        }

        // Reset some initials, as we need to guarantee initial behavior
        CurrSplineSegment = null;
        currEventHorizon  = eventHorizon * MazeScale.ComponentMax();

        // activate
        cubesActive = true;
    }
 private void OnEnable()
 {
     CODTrans = gameObject.transform;
     playerRB = GameObject.FindWithTag("Player").GetComponent <Rigidbody>();
     gravityFrameController = FindObjectOfType <GameController>().levelController.gravityFrameController;
     currEventHorizon       = eventHorizon * MazeScale.ComponentMax();
 }